diff --git a/components/post/PostPageContent.tsx b/components/post/PostPageContent.tsx index 863e2645a5e499682cbf924cec37a8a5d13cda48..97b1d22aaa8f3c45c2961371af97095660ca2ac2 100644 --- a/components/post/PostPageContent.tsx +++ b/components/post/PostPageContent.tsx @@ -1,8 +1,10 @@ +import { useState } from "react"; import { useRouter } from "next/router"; import Link from "next/link"; import usePostContent from "@/hooks/api/postPage/usePostContent"; import PostContentCard from "./PostContentCard"; +import PostPropertiesTable from "./PostPropertiesTable"; const HIVE_BLOG_URL = "https://hive.blog"; const PEAKD_URL = "https://peakd.com"; @@ -17,6 +19,10 @@ const PostPageContent = () => { const { data } = usePostContent(accountName, permlink); + const [isPropertiesOpen, setIsPropertiesOpen] = useState(false); + + const handlePropertiesToggle = () => setIsPropertiesOpen(!isPropertiesOpen); + if (!data) return; const { title, author } = data; @@ -55,7 +61,15 @@ const PostPageContent = () => { </div> </div> - <PostContentCard data={data} /> + <PostContentCard + isPropertiesOpen={isPropertiesOpen} + handlePropertiesToggle={handlePropertiesToggle} + data={data} + /> + <PostPropertiesTable + isPropertiesOpen={isPropertiesOpen} + data={data} + /> </div> ); };