From 5961ea6f467010facdc8c50d8fbcc2ca2fa11df8 Mon Sep 17 00:00:00 2001 From: Niall Maher Date: Mon, 21 Oct 2024 20:37:28 +0100 Subject: [PATCH] Add new Navigation for editor (#1163) * Add new navbar for editor * Update article test --- app/(app)/create/[[...paramsArr]]/page.tsx | 16 -- app/(app)/layout.tsx | 23 +-- app/(app)/my-posts/_client.tsx | 10 +- .../create/[[...paramsArr]]/_client.tsx | 108 ++++++------ .../create/[[...paramsArr]]/navigation.tsx | 160 ++++++++++++++++++ .../create/[[...paramsArr]]/not-found.tsx | 7 + app/(editor)/create/[[...paramsArr]]/page.tsx | 37 ++++ app/layout.tsx | 21 ++- e2e/articles.spec.ts | 4 +- utils/post.ts | 8 +- 10 files changed, 295 insertions(+), 99 deletions(-) delete mode 100644 app/(app)/create/[[...paramsArr]]/page.tsx rename app/{(app) => (editor)}/create/[[...paramsArr]]/_client.tsx (92%) create mode 100644 app/(editor)/create/[[...paramsArr]]/navigation.tsx create mode 100644 app/(editor)/create/[[...paramsArr]]/not-found.tsx create mode 100644 app/(editor)/create/[[...paramsArr]]/page.tsx diff --git a/app/(app)/create/[[...paramsArr]]/page.tsx b/app/(app)/create/[[...paramsArr]]/page.tsx deleted file mode 100644 index 96ab2f28..00000000 --- a/app/(app)/create/[[...paramsArr]]/page.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { redirect } from "next/navigation"; -import Content from "./_client"; -import { getServerAuthSession } from "@/server/auth"; - -export const metadata = { - title: "New post - Codú", -}; - -export default async function Page() { - const session = await getServerAuthSession(); - if (!session) { - redirect("/get-started"); - } - - return ; -} diff --git a/app/(app)/layout.tsx b/app/(app)/layout.tsx index 16def67f..cdb45497 100644 --- a/app/(app)/layout.tsx +++ b/app/(app)/layout.tsx @@ -79,22 +79,13 @@ export default async function RootLayout({ return ( <> - - - - - -