fix: post actions hydration failed

This commit is contained in:
DIYgod
2023-06-16 19:59:40 +01:00
parent a3ac8c4000
commit b96d003fd5
+2 -6
View File
@@ -1,6 +1,6 @@
import dynamic from "next/dynamic"
import { type MutableRefObject } from "react"
import PostActions from "~/components/site/PostActions"
import PostToc from "~/components/site/PostToc"
import { ExpandedCharacter, ExpandedNote } from "~/lib/types"
import { cn } from "~/lib/utils"
@@ -8,10 +8,6 @@ import { renderPageContent } from "~/markdown"
import { PageContentContainer } from "./PageContentContainer"
const DynamicPostActions = dynamic(
() => import("~/components/site/PostActions"),
)
export const PageContent = ({
className,
content,
@@ -56,7 +52,7 @@ export const PageContent = ({
{inParsedContent?.element}
</div>
{toc && inParsedContent?.toc && <PostToc data={inParsedContent?.toc} />}
{withActions && <DynamicPostActions page={page} site={site} />}
{withActions && <PostActions page={page} site={site} />}
</>
</PageContentContainer>
)