web: Revert auth redirect

This commit is contained in:
Quaternions 2025-03-26 17:23:21 -07:00
parent a9afdf38cf
commit 251a24efae
Signed by: Quaternions
GPG Key ID: D0DF5964F79AC131

@ -1,22 +1,8 @@
"use client"
import { useEffect } from "react";
import { redirect } from "next/navigation";
import Header from "./header";
export default function Webpage({children}: Readonly<{children?: React.ReactNode}>) {
//check if the user is logged into the auth
useEffect(() => {
const cookies = document.cookie.split("; ")
const hasCookie = cookies.some(cookie => cookie.startsWith("session_id="))
if (!hasCookie) {
redirect("https://auth.staging.strafes.net/")
}
}, [])
return <>
<Header/>
{children}
</>
return (<>
<Header/>
{children}
</>)
}