diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..1e482031 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +# editorconfig.org +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true \ No newline at end of file diff --git a/src/app/(lobby)/(content)/pages/[...slug]/page.tsx b/src/app/(lobby)/(content)/pages/[...slug]/page.tsx index 070a0243..a522f815 100644 --- a/src/app/(lobby)/(content)/pages/[...slug]/page.tsx +++ b/src/app/(lobby)/(content)/pages/[...slug]/page.tsx @@ -87,6 +87,17 @@ export default function Page({ params }: PageProps) { notFound() } + // Remove the /pages prefix from the slug + const formattedPage = { + ...page, + slug: page.slug.replace(/^\/pages/, ""), + } + + const formattedPages = allPages.map((page) => ({ + ...page, + slug: page.slug.replace(/^\/pages/, ""), + })) + return ( @@ -95,7 +106,11 @@ export default function Page({ params }: PageProps) { - + ) } diff --git a/src/config/site.ts b/src/config/site.ts index c9f1bba0..f2b48410 100644 --- a/src/config/site.ts +++ b/src/config/site.ts @@ -98,22 +98,22 @@ export const siteConfig = { items: [ { title: "About", - href: "/about", + href: "/pages/about", external: false, }, { title: "Contact", - href: "/legal/Contact", + href: "/pages/Contact", external: false, }, { title: "Terms", - href: "/legal/terms", + href: "/pages/terms", external: false, }, { title: "Privacy", - href: "/legal/privacy", + href: "/pages/privacy", external: false, }, ],