upgrade the project
This commit is contained in:
@@ -11,27 +11,26 @@ export const ShareButtons = (props: {
|
||||
title: string;
|
||||
quote?: string | null;
|
||||
}) => {
|
||||
const postURL = `https://${Config.SiteDomain}/blog/${props.postId}`;
|
||||
const postURL = encodeURI(`https://${Config.SiteDomain}/blog/${props.postId}`);
|
||||
const copyShareText = `${props.title} ${props.subtitle ? `- ${props.subtitle}` : ""} - ${
|
||||
Config.Nickname
|
||||
}'s Blog ${postURL}`;
|
||||
const { toast } = useToast();
|
||||
return (
|
||||
<div className="my-3 flex space-x-4 text-2xl">
|
||||
<div className="py-3 flex justify-center space-x-4 text-2xl">
|
||||
{props.allowShare != false ? (
|
||||
<>
|
||||
<div className="my-auto text-sm font-bold">{"SHARE :"}</div>
|
||||
<FacebookShareButton className="mx-2" url={postURL} quote={props.quote ?? props.title}>
|
||||
<FaFacebook title="Share to Facebook" className="hover:text-blue-500" />
|
||||
<FacebookShareButton className="mx-2" quote={props.quote ?? props.title} url={postURL}>
|
||||
<FaFacebook className="hover:text-blue-500" title="Share to Facebook" />
|
||||
</FacebookShareButton>
|
||||
<TwitterShareButton className="mx-2" url={postURL} title={props.title}>
|
||||
<FaTwitter title="Share to Twitter" className="hover:text-sky-500" />
|
||||
<TwitterShareButton className="mx-2" title={props.title} url={postURL}>
|
||||
<FaTwitter className="hover:text-sky-500" title="Share to Twitter" />
|
||||
</TwitterShareButton>
|
||||
<LinkedinShareButton className="mx-2" url={postURL} title={props.title}>
|
||||
<FaLinkedin title="Share to Linkedin" className="hover:text-blue-500" />
|
||||
<LinkedinShareButton className="mx-2" title={props.title} url={postURL}>
|
||||
<FaLinkedin className="hover:text-blue-500" title="Share to Linkedin" />
|
||||
</LinkedinShareButton>
|
||||
<RedditShareButton className="mx-2" url={postURL} title={props.title}>
|
||||
<FaReddit title="Share to Reddit" className="hover:text-orange-500" />
|
||||
<RedditShareButton className="mx-2" title={props.title} url={postURL}>
|
||||
<FaReddit className="hover:text-orange-500" title="Share to Reddit" />
|
||||
</RedditShareButton>
|
||||
<CopyToClipboard
|
||||
onCopy={() => {
|
||||
@@ -40,8 +39,8 @@ export const ShareButtons = (props: {
|
||||
text={copyShareText}
|
||||
>
|
||||
<FaLink
|
||||
title="Share with the post url and description"
|
||||
className="hover:text-gray-500 mx-2 cursor-pointer"
|
||||
title="Share with the post url and description"
|
||||
/>
|
||||
</CopyToClipboard>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user