Skip to content

Commit

Permalink
fix: breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
shuta13 committed Dec 31, 2023
1 parent 87507dc commit a2f7cc5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
9 changes: 9 additions & 0 deletions src/pages/guideline/+Page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Breadcrumb } from "~/components/Breadcrumb";
import { ContactX } from "~/components/Contact";
import { SectionHeaderCaption } from "~/components/SectionHeaderCaption";
import {
Expand All @@ -14,6 +15,14 @@ export default function Page() {
return (
<div className="space-y-64 md:space-y-120">
<section className="space-y-48">
<Breadcrumb
items={[
{
to: "/guideline",
label: "ガイドライン",
},
]}
/>
<h2 className="text-32 font-bold">{GUIDELINE_DESCRIPTION}</h2>
<div>
{GUIDELINE_SUB_DESCRIPTION.map((desc, index) => (
Expand Down
27 changes: 19 additions & 8 deletions src/pages/posts/@id/+Page.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
import { Breadcrumb } from "~/components/Breadcrumb";
import { WantedSponsor } from "~/components/WantedSponsor";
import { usePageContext } from "~/hooks/usePageContext";

export default function Page() {
const context = usePageContext();
return (
<>
<div
dangerouslySetInnerHTML={{
__html: context?.data?.post?.fields.body || "",
}}
className="post mb-120 border-b border-white pb-120"
/>
<div className="space-y-120">
<section className="space-y-48">
<Breadcrumb
items={[
{
to: `/posts/${context?.routeParams?.id || ""}`,
label: context?.data?.post?.fields.title || "",
},
]}
/>
<div
dangerouslySetInnerHTML={{
__html: context?.data?.post?.fields.body || "",
}}
className="post border-b border-white pb-120"
/>
</section>
<WantedSponsor />
</>
</div>
);
}

0 comments on commit a2f7cc5

Please sign in to comment.