mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 11:55:05 +03:00
* init features page * fix filtering * seo boostg * add features to sitemap * update copywriting * improve features descriptions * more studio features * moar featuress * better back to features * prev next feature nav * clean * improve page footer * fixes * stuff * sync filters with query params on page load * better mobile layout * 16px mobile input fontsize * add cover images or videos to features * improve a11y * update sitemap * last changes * update schema definitions
52 lines
1.4 KiB
TypeScript
52 lines
1.4 KiB
TypeScript
import Link from 'next/link'
|
|
import { cn, IconLinkedinSolid, IconTwitterX, IconYCombinator } from 'ui'
|
|
|
|
const ShareArticleActions = ({
|
|
title,
|
|
slug,
|
|
iconSize = 20,
|
|
basePath = 'https://supabase.com/blog/',
|
|
className,
|
|
}: {
|
|
title: string
|
|
slug: string
|
|
iconSize?: number
|
|
basePath?: string
|
|
className?: string
|
|
}) => {
|
|
const permalink = encodeURIComponent(`${basePath}${slug}`)
|
|
const encodedTitle = encodeURIComponent(title)
|
|
|
|
return (
|
|
<div className={cn('mt-4 flex items-center gap-4', className)}>
|
|
<Link
|
|
aria-label="Share on X"
|
|
href={`https://twitter.com/intent/tweet?url=${permalink}&text=${encodedTitle}`}
|
|
target="_blank"
|
|
className="text-foreground-lighter hover:text-foreground"
|
|
>
|
|
<IconTwitterX size={iconSize} />
|
|
</Link>
|
|
|
|
<Link
|
|
aria-label="Share on Linkedin"
|
|
href={`https://www.linkedin.com/shareArticle?url=${permalink}&text=${encodedTitle}`}
|
|
target="_blank"
|
|
className="text-foreground-lighter hover:text-foreground"
|
|
>
|
|
<IconLinkedinSolid size={iconSize} />
|
|
</Link>
|
|
<Link
|
|
aria-label="Share on Hacker News"
|
|
href={`https://news.ycombinator.com/submitlink?u=${permalink}&t=${encodedTitle}`}
|
|
target="_blank"
|
|
className="text-foreground-lighter hover:text-foreground"
|
|
>
|
|
<IconYCombinator size={iconSize} />
|
|
</Link>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default ShareArticleActions
|