Setup Page init

This commit is contained in:
headlesdev
2025-05-17 15:38:56 +02:00
parent 6c0edecabf
commit ac6c71eee9
2 changed files with 28 additions and 2 deletions

26
app/setup/page.tsx Normal file
View File

@@ -0,0 +1,26 @@
"use client";
import { useEffect } from "react";
import { useRouter } from "next/navigation";
import axios from "axios";
export default function SetupPage() {
const router = useRouter();
useEffect(() => {
const init = async () => {
const response = await axios.get("/api/user/init");
if (response.data.message !== "No users found") {
router.push("/");
}
};
init();
}, []);
return (
<div>
<h1>Setup</h1>
</div>
);
}