From d972a2c94759287a3d67417af9e46be2104a7fdf Mon Sep 17 00:00:00 2001 From: Saatvik Arya Date: Thu, 25 Jul 2024 14:00:26 -0700 Subject: [PATCH 1/9] middleware based auth --- apps/web/app/(auth)/onboarding/page.tsx | 6 ++-- apps/web/app/(auth)/signin/page.tsx | 11 ++----- apps/web/app/(landing)/Headers/Navbar.tsx | 2 +- apps/web/app/(landing)/page.tsx | 2 +- apps/web/app/actions/doers.ts | 4 +-- .../{ => app}/(canvas)/canvas/[id]/page.tsx | 0 .../app/{ => app}/(canvas)/canvas/page.tsx | 0 .../(canvas)/canvas/search&create.tsx | 0 .../{ => app}/(canvas)/canvas/thinkPad.tsx | 0 .../{ => app}/(canvas)/canvas/thinkPads.tsx | 0 .../app/{ => app}/(canvas)/canvasStyles.css | 0 apps/web/app/{ => app}/(canvas)/layout.tsx | 9 +----- .../{ => app}/(dash)/(memories)/content.tsx | 0 .../(dash)/(memories)/memories/page.tsx | 2 +- .../(memories)/space/[spaceid]/page.tsx | 5 +-- .../app/{ => app}/(dash)/chat/CodeBlock.tsx | 0 .../(dash)/chat/[chatid]/loading.tsx | 0 .../{ => app}/(dash)/chat/[chatid]/page.tsx | 0 .../{ => app}/(dash)/chat/chatQueryInput.tsx | 0 .../app/{ => app}/(dash)/chat/chatWindow.tsx | 2 +- .../(dash)/chat/markdownRenderHelpers.tsx | 0 apps/web/app/{ => app}/(dash)/chat/route.ts | 2 +- .../(dash)/dialogContentContainer.tsx | 0 .../{ => app}/(dash)/dialogTriggerWrapper.tsx | 0 .../(dash)/header/autoBreadCrumbs.tsx | 2 +- .../app/{ => app}/(dash)/header/header.tsx | 2 +- .../{ => app}/(dash)/header/newChatButton.tsx | 2 +- .../{ => app}/(dash)/header/signOutButton.tsx | 0 .../{ => app}/(dash)/home/filterSpaces.tsx | 0 .../web/app/{ => app}/(dash)/home/history.tsx | 0 apps/web/app/{ => app}/(dash)/home/page.tsx | 0 .../app/{ => app}/(dash)/home/queryinput.tsx | 0 apps/web/app/{ => app}/(dash)/layout.tsx | 11 ++----- apps/web/app/{ => app}/(dash)/menu.tsx | 2 +- .../{ => app}/(dash)/note/[noteid]/page.tsx | 0 apps/web/middleware.ts | 32 ++++++++++++------- 36 files changed, 42 insertions(+), 54 deletions(-) rename apps/web/app/{ => app}/(canvas)/canvas/[id]/page.tsx (100%) rename apps/web/app/{ => app}/(canvas)/canvas/page.tsx (100%) rename apps/web/app/{ => app}/(canvas)/canvas/search&create.tsx (100%) rename apps/web/app/{ => app}/(canvas)/canvas/thinkPad.tsx (100%) rename apps/web/app/{ => app}/(canvas)/canvas/thinkPads.tsx (100%) rename apps/web/app/{ => app}/(canvas)/canvasStyles.css (100%) rename apps/web/app/{ => app}/(canvas)/layout.tsx (73%) rename apps/web/app/{ => app}/(dash)/(memories)/content.tsx (100%) rename apps/web/app/{ => app}/(dash)/(memories)/memories/page.tsx (85%) rename apps/web/app/{ => app}/(dash)/(memories)/space/[spaceid]/page.tsx (87%) rename apps/web/app/{ => app}/(dash)/chat/CodeBlock.tsx (100%) rename apps/web/app/{ => app}/(dash)/chat/[chatid]/loading.tsx (100%) rename apps/web/app/{ => app}/(dash)/chat/[chatid]/page.tsx (100%) rename apps/web/app/{ => app}/(dash)/chat/chatQueryInput.tsx (100%) rename apps/web/app/{ => app}/(dash)/chat/chatWindow.tsx (99%) rename apps/web/app/{ => app}/(dash)/chat/markdownRenderHelpers.tsx (100%) rename apps/web/app/{ => app}/(dash)/chat/route.ts (71%) rename apps/web/app/{ => app}/(dash)/dialogContentContainer.tsx (100%) rename apps/web/app/{ => app}/(dash)/dialogTriggerWrapper.tsx (100%) rename apps/web/app/{ => app}/(dash)/header/autoBreadCrumbs.tsx (95%) rename apps/web/app/{ => app}/(dash)/header/header.tsx (97%) rename apps/web/app/{ => app}/(dash)/header/newChatButton.tsx (96%) rename apps/web/app/{ => app}/(dash)/header/signOutButton.tsx (100%) rename apps/web/app/{ => app}/(dash)/home/filterSpaces.tsx (100%) rename apps/web/app/{ => app}/(dash)/home/history.tsx (100%) rename apps/web/app/{ => app}/(dash)/home/page.tsx (100%) rename apps/web/app/{ => app}/(dash)/home/queryinput.tsx (100%) rename apps/web/app/{ => app}/(dash)/layout.tsx (81%) rename apps/web/app/{ => app}/(dash)/menu.tsx (99%) rename apps/web/app/{ => app}/(dash)/note/[noteid]/page.tsx (100%) diff --git a/apps/web/app/(auth)/onboarding/page.tsx b/apps/web/app/(auth)/onboarding/page.tsx index 9728d107..880afd12 100644 --- a/apps/web/app/(auth)/onboarding/page.tsx +++ b/apps/web/app/(auth)/onboarding/page.tsx @@ -27,7 +27,7 @@ export default function Home() { } if (currStep > 3) { updateDb().then(() => { - push("/home?q=what%20is%20supermemory"); + push("/app/home?q=what%20is%20supermemory"); }); } }, [currStep]); @@ -297,7 +297,7 @@ function StepThree({ currStep }: { currStep: number }) { toast.error(`Memory creation failed: ${cont.error}`); } - push(`/home?q=what%20is%20supermemory`); + push(`/app/home?q=what%20is%20supermemory`); }} >