2023-10-04 13:51:04 +00:00
|
|
|
import { useEffect } from "react";
|
|
|
|
|
|
|
|
// next
|
|
|
|
import { NextPage } from "next";
|
2023-11-08 17:15:27 +00:00
|
|
|
import { useRouter } from "next/navigation";
|
2023-10-04 13:51:04 +00:00
|
|
|
|
|
|
|
const Index: NextPage = () => {
|
|
|
|
const router = useRouter();
|
|
|
|
const { next_path } = router.query as { next_path: string };
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
if (next_path) router.push(`/login?next_path=${next_path}`);
|
|
|
|
else router.push(`/login`);
|
|
|
|
}, [router, next_path]);
|
|
|
|
|
|
|
|
return null;
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Index;
|