Skip to content

Commit 46f899c

Browse files
committed
Place useAuthRedirect to core pages
1 parent a26ac8b commit 46f899c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ Prerequisites: Docker (with compose plugin)
2020
git clone https://github.com/m-danya/planty
2121
cd planty
2222
cp .env.sample .env
23-
echo "\nPLANTY_AUTH_SECRET=$(openssl rand -base64 32)" >> .env
23+
echo -e "\nPLANTY_AUTH_SECRET=$(openssl rand -base64 32)" >> .env
24+
# change other secrets in .env
2425
2526
docker compose up -d
2627
```

frontend/app/(main)/layout.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
"use client";
2+
13
import { MainSidebarWrapper } from "@/components/left-panel/main-sidebar-wrapper";
4+
import { useAuthRedirect } from "@/hooks/use-auth-redirect";
25

36
export default function RootLayout({
47
children,
58
}: Readonly<{
69
children: React.ReactNode;
710
}>) {
11+
useAuthRedirect();
12+
813
return <MainSidebarWrapper>{children}</MainSidebarWrapper>;
914
}

0 commit comments

Comments
 (0)