@@ -25,7 +28,6 @@ export default function PagesLayout({
-
);
}
diff --git a/app/(pages)/settings/page.tsx b/app/(pages)/settings/page.tsx
index 4fa8c34..3ac4aeb 100644
--- a/app/(pages)/settings/page.tsx
+++ b/app/(pages)/settings/page.tsx
@@ -354,17 +354,13 @@ export default function SettingsPage() {
useEffect(() => {
if (isPending) return;
- if (!session?.user) {
- router.replace("/login");
- return;
- }
fetchWebhooks();
- if (session.user.role === "admin") {
+ if (session?.user?.role === "admin") {
fetchSettings();
} else {
setLoadingSettings(false);
}
- }, [session, isPending, router, fetchSettings, fetchWebhooks]);
+ }, [session, isPending, fetchSettings, fetchWebhooks]);
async function handleToggleRegistration(checked: boolean) {
setToggling(true);
diff --git a/app/globals.css b/app/globals.css
index 59b0398..690e025 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -65,7 +65,7 @@
--secondary-foreground: oklch(0.85 0.02 80);
--muted: oklch(0.22 0.008 55);
--muted-foreground: oklch(0.63 0.02 80);
- --accent: oklch(0.25 0.010 55);
+ --accent: oklch(0.25 0.01 55);
--accent-foreground: oklch(0.93 0.015 80);
--destructive: oklch(0.65 0.2 25);
--border: oklch(1 0.015 65 / 10%);
@@ -175,7 +175,7 @@ body::before {
[data-slot="skeleton"] {
animation: warm-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
- background: oklch(0.25 0.010 55);
+ background: oklch(0.25 0.01 55);
}
/* Scrollbar styling */
diff --git a/app/layout.tsx b/app/layout.tsx
index 138da0f..fd18d2b 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -3,6 +3,7 @@ import { DM_Sans, DM_Serif_Display, Geist_Mono } from "next/font/google";
import { TooltipProvider } from "@/components/ui/tooltip";
import "./globals.css";
+import { Toaster } from "@/components/ui/sonner";
const dmSans = DM_Sans({
variable: "--font-dm-sans",
@@ -36,6 +37,7 @@ export default function RootLayout({
className={`${dmSans.variable} ${dmSerif.variable} ${geistMono.variable} font-sans antialiased`}
>
{children}
+