diff --git a/src/app/(auth)/(center)/layout.tsx b/src/app/(auth)/(center)/layout.tsx
deleted file mode 100644
index a0b4c0d8a1..0000000000
--- a/src/app/(auth)/(center)/layout.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import { auth } from '@clerk/nextjs/server';
-import { redirect } from 'next/navigation';
-
-export default async function CenteredLayout(props: {
- children: React.ReactNode;
-}) {
- const { userId } = await auth();
-
- if (userId) {
- redirect('/dashboard');
- }
-
- return (
-
- {props.children}
-
- );
-}
diff --git a/src/app/(auth)/dashboard/page.tsx b/src/app/(auth)/dashboard/page.tsx
deleted file mode 100644
index 003ab79f0e..0000000000
--- a/src/app/(auth)/dashboard/page.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { useTranslations } from 'next-intl';
-
-import { MessageState } from '@/components/dashboard/MessageState';
-import { TitleBar } from '@/components/dashboard/TitleBar';
-
-const DashboardIndexPage = () => {
- const t = useTranslations('DashboardIndex');
-
- return (
- <>
-
-
-
-
-
-
- }
- title={t('message_state_title')}
- description={t.rich('message_state_description', {
- code: (chunks) => (
-
- {chunks}
-
- ),
- })}
- button={
-
- }
- />
- >
- );
-};
-
-export default DashboardIndexPage;
diff --git a/src/app/(auth)/layout.tsx b/src/app/(auth)/layout.tsx
deleted file mode 100644
index 2b4f153642..0000000000
--- a/src/app/(auth)/layout.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-'use client';
-
-import { enUS, frFR } from '@clerk/localizations';
-import { ClerkProvider } from '@clerk/nextjs';
-import { useLocale } from 'next-intl';
-
-export default function AuthLayout({
- children,
-}: {
- children: React.ReactNode;
-}) {
- const locale = useLocale();
-
- return (
-
- {children}
-
- );
-}
diff --git a/src/app/(auth)/dashboard/layout.tsx b/src/app/(authenticated)/dashboard/layout.tsx
similarity index 100%
rename from src/app/(auth)/dashboard/layout.tsx
rename to src/app/(authenticated)/dashboard/layout.tsx
diff --git a/src/app/(auth)/dashboard/organization-profile/[[...organization-profile]]/page.tsx b/src/app/(authenticated)/dashboard/organization-profile/[[...organization-profile]]/page.tsx
similarity index 88%
rename from src/app/(auth)/dashboard/organization-profile/[[...organization-profile]]/page.tsx
rename to src/app/(authenticated)/dashboard/organization-profile/[[...organization-profile]]/page.tsx
index a6a582c118..b458d2e6f8 100644
--- a/src/app/(auth)/dashboard/organization-profile/[[...organization-profile]]/page.tsx
+++ b/src/app/(authenticated)/dashboard/organization-profile/[[...organization-profile]]/page.tsx
@@ -3,7 +3,7 @@ import { useTranslations } from 'next-intl';
import { TitleBar } from '@/components/dashboard/TitleBar';
-const OrganizationProfilePage = () => {
+export default function Page() {
const t = useTranslations('OrganizationProfile');
return (
@@ -26,6 +26,4 @@ const OrganizationProfilePage = () => {
/>
>
);
-};
-
-export default OrganizationProfilePage;
+}
diff --git a/src/app/(authenticated)/dashboard/page.tsx b/src/app/(authenticated)/dashboard/page.tsx
new file mode 100644
index 0000000000..7b2c42d5bd
--- /dev/null
+++ b/src/app/(authenticated)/dashboard/page.tsx
@@ -0,0 +1,37 @@
+import { useTranslations } from 'next-intl';
+
+import { TitleBar } from '@/components/dashboard/TitleBar';
+
+const DashboardIndexPage = () => {
+ const t = useTranslations('DashboardIndex');
+
+ return (
+ <>
+
+
+
+
+
+ {t('message_state_title')}
+
+
+
+ >
+ );
+};
+
+export default DashboardIndexPage;
diff --git a/src/app/(auth)/dashboard/user-profile/[[...user-profile]]/page.tsx b/src/app/(authenticated)/dashboard/user-profile/[[...user-profile]]/page.tsx
similarity index 67%
rename from src/app/(auth)/dashboard/user-profile/[[...user-profile]]/page.tsx
rename to src/app/(authenticated)/dashboard/user-profile/[[...user-profile]]/page.tsx
index 981c618f43..e10967b15d 100644
--- a/src/app/(auth)/dashboard/user-profile/[[...user-profile]]/page.tsx
+++ b/src/app/(authenticated)/dashboard/user-profile/[[...user-profile]]/page.tsx
@@ -3,7 +3,7 @@ import { useTranslations } from 'next-intl';
import { TitleBar } from '@/components/dashboard/TitleBar';
-const UserProfilePage = () => {
+export default function Page() {
const t = useTranslations('UserProfile');
return (
@@ -12,19 +12,11 @@ const UserProfilePage = () => {
title={t('title_bar')}
description={t('title_bar_description')}
/>
-
>
);
-};
-
-export default UserProfilePage;
+}
diff --git a/src/app/(authenticated)/layout.tsx b/src/app/(authenticated)/layout.tsx
new file mode 100644
index 0000000000..5abcbb091f
--- /dev/null
+++ b/src/app/(authenticated)/layout.tsx
@@ -0,0 +1,16 @@
+import { redirect } from 'next/navigation';
+import { auth as clerkAuth } from '@clerk/nextjs/server';
+
+export default async function CenteredLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ const auth = await clerkAuth();
+
+ if (!auth.userId) {
+ redirect('/');
+ }
+
+ return children;
+}
diff --git a/src/app/(auth)/onboarding/organization-selection/page.tsx b/src/app/(authenticated)/onboarding/organization-selection/page.tsx
similarity index 100%
rename from src/app/(auth)/onboarding/organization-selection/page.tsx
rename to src/app/(authenticated)/onboarding/organization-selection/page.tsx
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 904f5bde22..0f74245c78 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -3,6 +3,8 @@ import '@/styles/globals.css';
import type { Metadata } from 'next';
import { NextIntlClientProvider } from 'next-intl';
import { getLocale } from 'next-intl/server';
+import { enUS, frFR } from '@clerk/localizations';
+import { ClerkProvider } from '@clerk/nextjs';
import { ThemeProvider } from '@/components/ThemeProvider';
@@ -45,7 +47,9 @@ export default async function RootLayout({
enableSystem
disableTransitionOnChange
>
- {children}
+
+ {children}
+