mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-15 22:38:47 +00:00
Access Token 유무에 따른 자동 리다이렉트 구현
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
<script lang="ts">
|
||||
import { goto } from "$app/navigation";
|
||||
import { Button, TextButton } from "$lib/components/buttons";
|
||||
import { TitleDiv, BottomDiv } from "$lib/components/divs";
|
||||
import { TextInput } from "$lib/components/inputs";
|
||||
import { requestLogin } from "./service";
|
||||
|
||||
let { data } = $props();
|
||||
|
||||
let email = $state("");
|
||||
let password = $state("");
|
||||
|
||||
@@ -11,8 +14,11 @@
|
||||
// TODO: Validation
|
||||
|
||||
const ok = await requestLogin(email, password);
|
||||
|
||||
// TODO: Action
|
||||
if (ok) {
|
||||
goto(data.redirectPath);
|
||||
} else {
|
||||
// TODO: Alert
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user