diff --git a/src/app/dev/auth/login/page.tsx b/src/app/dev/auth/login/page.tsx new file mode 100644 index 00000000..60cc8469 --- /dev/null +++ b/src/app/dev/auth/login/page.tsx @@ -0,0 +1,9 @@ +import { Login } from "@/app_modules/auth"; + +export default function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/auth/splash/page.tsx b/src/app/dev/auth/splash/page.tsx index 4f33da8f..5fd14a09 100644 --- a/src/app/dev/auth/splash/page.tsx +++ b/src/app/dev/auth/splash/page.tsx @@ -1,7 +1,12 @@ import { SplashScreen } from "@/app_modules/auth"; +import { useShallowEffect } from "@mantine/hooks"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; -export default function Page(){ - return<> - +export default function PageSplash() { + return ( + <> + -} \ No newline at end of file + ); +} diff --git a/src/app/dev/home/page.tsx b/src/app/dev/home/page.tsx new file mode 100644 index 00000000..489c9862 --- /dev/null +++ b/src/app/dev/home/page.tsx @@ -0,0 +1,9 @@ +import { HomeView } from "@/app_modules/home"; + +export default function Page() { + return ( + <> + + + ); +} diff --git a/src/app/page.tsx b/src/app/page.tsx index 21cfd5c9..6cd2068f 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,7 +1,7 @@ +import { SplashScreen } from "@/app_modules/auth"; import { redirect } from "next/navigation"; - +import PageSplash from "./dev/auth/splash/page"; export default async function Page() { - - return redirect("/dev/auth/splash") + return ; } diff --git a/src/app_modules/auth/index.ts b/src/app_modules/auth/index.ts index 9ad38fa5..ae882517 100644 --- a/src/app_modules/auth/index.ts +++ b/src/app_modules/auth/index.ts @@ -1,3 +1,4 @@ import SplashScreen from "./splash/view"; +import Login from "./login/view"; -export {SplashScreen} \ No newline at end of file +export {SplashScreen, Login} \ No newline at end of file diff --git a/src/app_modules/auth/login/view.tsx b/src/app_modules/auth/login/view.tsx new file mode 100644 index 00000000..44b7451b --- /dev/null +++ b/src/app_modules/auth/login/view.tsx @@ -0,0 +1,11 @@ +"use client" +import { Center, Title } from "@mantine/core"; + +export default function Login(){ + return <> +
+ Login + +
+ +} \ No newline at end of file diff --git a/src/app_modules/auth/splash/view.tsx b/src/app_modules/auth/splash/view.tsx index dd6d63de..212fc5bc 100644 --- a/src/app_modules/auth/splash/view.tsx +++ b/src/app_modules/auth/splash/view.tsx @@ -1,10 +1,28 @@ -"use client" +"use client"; -import { Title } from "@mantine/core" +import { Title } from "@mantine/core"; +import { useShallowEffect } from "@mantine/hooks"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; -export default function SplashScreen(){ - return <> - Splash Screen - +export default function SplashScreen() { + const router = useRouter(); + const [val, setVal] = useState(false); + + useShallowEffect(() => { + if (!val) { + setTimeout(() => { + return router.push("/dev/auth/login"); + }, 2000); + } else { + setTimeout(() => { + return router.push("/dev/home"); + }, 2000); + } + }, []); + return ( + <> + Splash Screen -} \ No newline at end of file + ); +} diff --git a/src/app_modules/home/index.ts b/src/app_modules/home/index.ts new file mode 100644 index 00000000..ae129f1c --- /dev/null +++ b/src/app_modules/home/index.ts @@ -0,0 +1,3 @@ +import HomeView from "./view"; + +export {HomeView} \ No newline at end of file diff --git a/src/app_modules/home/view.tsx b/src/app_modules/home/view.tsx new file mode 100644 index 00000000..79d38a05 --- /dev/null +++ b/src/app_modules/home/view.tsx @@ -0,0 +1,11 @@ +"use client"; + +import { Title } from "@mantine/core"; + +export default function HomeView() { + return ( + <> + Home + + ); +}