diff --git a/explorer-nextjs/src/app/(pages)/onboarding/[slug]/page.tsx b/explorer-nextjs/src/app/(pages)/onboarding/[slug]/page.tsx new file mode 100644 index 0000000000..b81e11b05a --- /dev/null +++ b/explorer-nextjs/src/app/(pages)/onboarding/[slug]/page.tsx @@ -0,0 +1,140 @@ +import TableOfContents from "@/components/blogs/TableOfContents"; +import type BlogArticle from "@/components/blogs/types"; +import { Breadcrumbs } from "@/components/breadcrumbs/Breadcrumbs"; +import { ContentLayout } from "@/components/contentLayout/ContentLayout"; +import SectionHeading from "@/components/headings/SectionHeading"; +import { Link } from "@/components/muiLink"; +import { Wrapper } from "@/components/wrapper"; +import { Box, Stack, Typography } from "@mui/material"; +import Grid from "@mui/material/Grid2"; +import Image from "next/image"; + +export default async function BlogPage({ + params, +}: { + params: Promise<{ slug: string }>; +}) { + const { slug } = await params; + const file = `@/data/${slug}.json`; + + try { + const blogArticle: BlogArticle = await import(file); + const breadcrumbItems = [ + { + label: "Onboarding", + href: "/onboarding", + }, + { label: blogArticle.title, isCurrentPage: true }, + ]; + return ( + + + + + + + + + + + Author + {(blogArticle?.attributes?.blogAuthors?.length ?? 0) > 1 + ? "s" + : ""} + :{" "} + {blogArticle?.attributes?.blogAuthors?.map( + (author: string) => ( + + {author} + + ), + )} + + + + + {blogArticle.attributes.readingTime}{" "} + {blogArticle.attributes.readingTime > 1 ? "mins" : "min"}{" "} + read + + + blog-image + + {blogArticle.overview.content.map(({ text }) => ( + + {text} + + ))} + + {blogArticle.sections.map((section) => ( + + + {section.text.map(({ text }) => ( + + {text} + + ))} + + ))} + + + + ({ + heading: section.heading, + id: section.id, + }))} + /> + + + + + ); + } catch (error) { + return ( + + + + + Oops! Looks like the page you’re looking for got mixed up in the + noise. Don’t worry, your privacy is intact. Let’s get you + back to the homepage. + + + + ); + } +} diff --git a/explorer-nextjs/src/app/(pages)/onboarding/page.tsx b/explorer-nextjs/src/app/(pages)/onboarding/page.tsx index af76e54ed4..e0f977d7e0 100644 --- a/explorer-nextjs/src/app/(pages)/onboarding/page.tsx +++ b/explorer-nextjs/src/app/(pages)/onboarding/page.tsx @@ -1,16 +1,15 @@ -import { Wrapper } from "@/components/wrapper"; -import { Box, Typography } from "@mui/material"; +import BlogArticlesCards from "@/components/blogs/BlogArticleCards"; +import { ContentLayout } from "@/components/contentLayout/ContentLayout"; +import SectionHeading from "@/components/headings/SectionHeading"; +import Grid from "@mui/material/Grid2"; export default function OnboardingPage() { return ( -
-
- - - Onboarding page - - -
-
+ + + + + + ); }