[라우터 방식 변경]
This commit is contained in:
@@ -71,9 +71,9 @@ const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 이미 로그인된 경우 홈으로 리다이렉션
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
if (userStore.isLoggedIn) {
|
||||
router.push("/");
|
||||
await navigateTo("/");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -89,7 +89,7 @@ async function signIn() {
|
||||
const result = await userStore.login(userId.value, password.value);
|
||||
|
||||
if (result.success) {
|
||||
await router.push("/");
|
||||
await navigateTo("/");
|
||||
} else {
|
||||
errorMessage.value = result.error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user