diff --git a/src/templates/Entry.tsx b/src/templates/Entry.tsx index ebfc819..bd70fd8 100644 --- a/src/templates/Entry.tsx +++ b/src/templates/Entry.tsx @@ -1,25 +1,7 @@ import Main from "@/templates/Main" import { useParams } from "react-router" - +import Page from "./Page" export default function Entry() { const { entry } = useParams() - return ( - - - - - - - - {entry?.replace(/_/g, " ")} - - - - - - - - - - ) + return {entry?.replace(/_/g, " ")}} /> } diff --git a/src/templates/Page.tsx b/src/templates/Page.tsx new file mode 100644 index 0000000..7f4bc02 --- /dev/null +++ b/src/templates/Page.tsx @@ -0,0 +1,23 @@ +import Main from "./Main" + +export default function Page({ pageTitle = null, pageBody = null, titleComponent = null }) { + return ( + + + + + + + + {titleComponent ? titleComponent : {pageTitle}} + + + + {pageBody} + + + + + + ) +} diff --git a/src/templates/Tag.tsx b/src/templates/Tag.tsx index fcd5ba0..7b7fabd 100644 --- a/src/templates/Tag.tsx +++ b/src/templates/Tag.tsx @@ -1,26 +1,16 @@ import Main from "@/templates/Main" import { useParams } from "react-router" - +import Page from "./Page" export default function Tag() { const { tag } = useParams() return ( - - - - - - - - Entries tagged: - {tag} - - - - - - - - - + + Entries tagged: + {tag} + > + } + /> ) }