frontpage/components/Blog/ContentPage.tsx

14 lines
741 B
TypeScript
Raw Normal View History

2022-10-15 22:17:51 +02:00
import type { NextPage } from "next";
import type { ProjectRender, DiaryRender } from "../../lib/content/types";
import DiaryPageSelector from "./DiaryPageSelector";
const ContentPage: NextPage<{ content: ProjectRender | DiaryRender }> = ({ content }) => {
return (<>
2022-10-18 14:05:45 +02:00
{content.type === "diary" ? <DiaryPageSelector title={content.title} pageSelected={content.pageSelected} name={content.name} pages={content.entries} /> : null}
2022-10-15 22:17:51 +02:00
<div dangerouslySetInnerHTML={{ __html: content.html }}>
</div>
2022-10-18 14:05:45 +02:00
{content.type === "diary" ? <DiaryPageSelector title={content.title} pageSelected={content.pageSelected} name={content.name} pages={content.entries} bottom /> : null}
2022-10-15 22:17:51 +02:00
</>);
};
export default ContentPage;