Skip to content

Commit

Permalink
Add Warpcast share button to blog footer
Browse files Browse the repository at this point in the history
  • Loading branch information
gskril committed Feb 8, 2024
1 parent 415cfa0 commit 381b08f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions blog/public/icons/warpcast.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions blog/src/components/post/PostFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { FaFacebookF, FaLinkedin } from 'react-icons/fa';

import { BlogPostMetadata } from '@/types/BlogPostMetadata';

import warpcastLogo from '../../../public/icons/warpcast.svg';
import xLogo from '../../../public/icons/x.svg';
import { Author } from '../Author';
import { BigTag } from '../tags/BigTag';
Expand All @@ -31,6 +32,18 @@ export const PostFooter = ({ post }: { post: BlogPostMetadata }) => {
>
<Image src={xLogo} alt="X logo" />
</a>
<a
href={`https://warpcast.com/~/compose?text=${encodeURIComponent(
post.title + ' | ENS Blog'
)}&embeds[]=${
'https://blog.ens.domains/post/' + post.slug
}`}
target="_blank"
rel="noopener noreferrer"
className="flex w-5 items-center"
>
<Image src={warpcastLogo} alt="Warpcast logo" />
</a>
<a
href={`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(
'https://blog.ens.domains/post/' + post.slug
Expand Down

0 comments on commit 381b08f

Please sign in to comment.