💚 Fixes CI web build
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
import * as v from "valibot"
|
||||
import type { FormSubmitEvent } from "@nuxt/ui"
|
||||
|
||||
const token = useCookie("token")
|
||||
|
||||
const schema = v.object({
|
||||
token: v.pipe(v.string(), v.nonEmpty("Please enter your token"))
|
||||
})
|
||||
@@ -39,4 +41,10 @@ async function onSubmit(event: FormSubmitEvent<Schema>) {
|
||||
console.log(res)
|
||||
toast.add({ title: "Token saved", color: "success" })
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (token.value) {
|
||||
return navigateTo("/")
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user