refactor: 로그인 완료 시 하위 모든 페이지 리렌더링 작업

This commit is contained in:
2025-04-02 17:34:47 +09:00
parent 84d4635a75
commit 623b1e985e
@@ -1,13 +1,11 @@
"use client";
import Image from "next/image";
import { useRouter } from "next/navigation";
import { images } from "@common/assets";
import { LoginApi } from "@/entities/auth";
import "./login.css";
function LoginPage() {
const router = useRouter();
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
@@ -16,7 +14,7 @@ function LoginPage() {
const password = formData.get("password") as string;
await LoginApi.login({ userId, password });
router.push("/site");
window.location.href = "/dashboard";
};
return (