init: init of the repository with basic connexion page and dashboard
This commit is contained in:
24
app/tiktok/layout.tsx
Normal file
24
app/tiktok/layout.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import Sidebar from "@/components/Sidebar";
|
||||
|
||||
export default function AuthLayout({ children }: { children: React.ReactNode }) {
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
if (sessionStorage.getItem("wyview_auth") !== "true") {
|
||||
router.push("/");
|
||||
}
|
||||
}, [router]);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen">
|
||||
<Sidebar />
|
||||
<main className="ml-56 flex-1 p-8">
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
0
app/tiktok/page.tsx
Normal file
0
app/tiktok/page.tsx
Normal file
Reference in New Issue
Block a user