From e46b488339276e9e4117f26a75bdeb558eee2b65 Mon Sep 17 00:00:00 2001 From: 0x74h51N Date: Wed, 18 Sep 2024 18:40:43 +0300 Subject: [PATCH] res fix --- app/[lang]/blog/[uid]/page.tsx | 8 ++++++-- app/[lang]/blog/components/RichText.tsx | 2 +- app/[lang]/blog/components/ui/ShareButtons.tsx | 13 ++++++++++--- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/app/[lang]/blog/[uid]/page.tsx b/app/[lang]/blog/[uid]/page.tsx index c693a70..4bcda67 100644 --- a/app/[lang]/blog/[uid]/page.tsx +++ b/app/[lang]/blog/[uid]/page.tsx @@ -14,6 +14,7 @@ import { createTranslation } from '@/i18n/server'; import { Locales } from '@/i18n/settings'; import { langMap } from '@/utils/langMap'; import dynamic from 'next/dynamic'; +import ShareButtons from '../components/ui/ShareButtons'; const PostCard = dynamic( () => import('../components/PostCard').then((mod) => mod.PostCard), @@ -103,7 +104,7 @@ export default async function Page({ params }: { params: Params }) {
@@ -128,9 +129,12 @@ export default async function Page({ params }: { params: Params }) {
+
+ +
diff --git a/app/[lang]/blog/components/RichText.tsx b/app/[lang]/blog/components/RichText.tsx index 0f696ac..fcad2c8 100644 --- a/app/[lang]/blog/components/RichText.tsx +++ b/app/[lang]/blog/components/RichText.tsx @@ -15,7 +15,7 @@ export const richTextComponents: JSXMapSerializer = { heading1: ({ children, node }) => ( {children} diff --git a/app/[lang]/blog/components/ui/ShareButtons.tsx b/app/[lang]/blog/components/ui/ShareButtons.tsx index 5742416..758bd86 100644 --- a/app/[lang]/blog/components/ui/ShareButtons.tsx +++ b/app/[lang]/blog/components/ui/ShareButtons.tsx @@ -1,11 +1,13 @@ +'use client'; import IconButton from '@/components/Buttons/IconButton'; +import clsx from 'clsx'; import { usePathname } from 'next/navigation'; import { useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { MdCheck } from 'react-icons/md'; import { RiShare2Fill } from 'react-icons/ri'; -const ShareButtons = () => { +const ShareButtons = ({ textHidden = true }) => { const [shareUrl, setShareUrl] = useState(''); const pathname = usePathname(); const { t } = useTranslation('blog'); @@ -29,7 +31,12 @@ const ShareButtons = () => { return (
- + {t('blog-post.share.share')}
@@ -74,7 +81,7 @@ const ShareButtons = () => { />