fix: TS errors, serialize calls, unused imports, pre-commit hook
This commit is contained in:
@@ -1,35 +1,14 @@
|
||||
<script lang="ts" setup>
|
||||
import { Link } from '@adonisjs/inertia/vue'
|
||||
import { useForm } from '@inertiajs/vue3'
|
||||
import { computed } from 'vue'
|
||||
import EmptyLayout from '~/pages/layout/emptyLayout.vue'
|
||||
|
||||
defineOptions({ layout: EmptyLayout })
|
||||
|
||||
const props = defineProps<{ errors?: Record<string, string> }>()
|
||||
|
||||
const vineErrors = computed(() => {
|
||||
if (props.errors && !Array.isArray(props.errors)) {
|
||||
return props.errors
|
||||
}
|
||||
return {}
|
||||
})
|
||||
|
||||
const authError = computed(() => {
|
||||
if (props.errors && !Array.isArray(props.errors)) {
|
||||
return props.errors
|
||||
}
|
||||
return null
|
||||
})
|
||||
|
||||
const form = useForm({
|
||||
email: '',
|
||||
password: '',
|
||||
})
|
||||
|
||||
function getErrorMessage(field: string): string | null {
|
||||
return vineErrors.value[field] || null
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -21,7 +21,7 @@ const form = useForm({
|
||||
<p class="text-sm text-gray-600 mt-2">Join PC Creator today</p>
|
||||
</div>
|
||||
|
||||
<Form route="new_account.store" #default="{ processing, errors }">
|
||||
<Form route="new_account.store" #default="{ processing }">
|
||||
<div class="space-y-4 sm:space-y-6">
|
||||
<div>
|
||||
<label class="block">
|
||||
|
||||
Reference in New Issue
Block a user