From 901b512a0dae59cfec250128d5bc83d84203afb6 Mon Sep 17 00:00:00 2001 From: Jordi Enric Date: Mon, 28 Oct 2024 23:21:24 +0100 Subject: [PATCH] wip --- apps/web/app/auth/confirm/route.ts | 2 +- .../web/src/components/LoggedInUserChecks.tsx | 28 +++--- apps/web/src/layouts/AppLayout.tsx | 2 +- apps/web/src/pages/account/index.tsx | 2 +- .../src/pages/blogs/[blogId]/categories.tsx | 14 ++- apps/web/src/pages/blogs/[blogId]/tags.tsx | 94 ++++++++++--------- apps/web/src/pages/blogs/create.tsx | 5 +- apps/web/src/pages/pricing.tsx | 14 +-- apps/web/src/queries/categories.ts | 6 +- apps/web/src/queries/subscription.ts | 19 +++- 10 files changed, 107 insertions(+), 79 deletions(-) diff --git a/apps/web/app/auth/confirm/route.ts b/apps/web/app/auth/confirm/route.ts index 368c557..f582d95 100644 --- a/apps/web/app/auth/confirm/route.ts +++ b/apps/web/app/auth/confirm/route.ts @@ -6,7 +6,7 @@ export async function GET(request: NextRequest) { const { searchParams } = new URL(request.url); const token_hash = searchParams.get("token_hash"); const type = searchParams.get("type") as EmailOtpType | null; - const next = searchParams.get("next") ?? "/"; + const next = searchParams.get("next") ?? "/blogs"; const redirectTo = request.nextUrl.clone(); redirectTo.pathname = next; diff --git a/apps/web/src/components/LoggedInUserChecks.tsx b/apps/web/src/components/LoggedInUserChecks.tsx index 2e7d924..7e6a536 100644 --- a/apps/web/src/components/LoggedInUserChecks.tsx +++ b/apps/web/src/components/LoggedInUserChecks.tsx @@ -22,20 +22,20 @@ const LoggedInUserChecks = (props: PropsWithChildren) => { subscription?.status && validSubscriptionStatus.includes(subscription.status); - if (!isLoading && !isValidSubscription) { - return ( -
-
- -
-
- - Sign out - -
-
- ); - } + // if (!isLoading && !isValidSubscription) { + // return ( + //
+ //
+ // + //
+ //
+ // + // Sign out + // + //
+ //
+ // ); + // } return <>{props.children}; }; diff --git a/apps/web/src/layouts/AppLayout.tsx b/apps/web/src/layouts/AppLayout.tsx index 7b3cf1c..f917db3 100644 --- a/apps/web/src/layouts/AppLayout.tsx +++ b/apps/web/src/layouts/AppLayout.tsx @@ -80,6 +80,7 @@ export default function AppLayout({ return (
+ {IS_DEV && } Zenblog @@ -87,7 +88,6 @@ export default function AppLayout({ - {IS_DEV && }