mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-19 08:26:07 +00:00
26 lines
543 B
TypeScript
26 lines
543 B
TypeScript
|
|
"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>
|
||
|
|
);
|
||
|
|
}
|