XNT-Mobile-Wallet/src/composables/useAuthRouting.ts

24 lines
393 B
TypeScript

import { useAuthStore } from '@/stores'
export function useAuthRouting() {
const authStore = useAuthStore()
const goToCreate = () => {
authStore.setState('create')
}
const goToRecover = () => {
authStore.setState('recovery')
}
const goBackToWelcome = () => {
authStore.setState('welcome')
}
return {
goToCreate,
goToRecover,
goBackToWelcome,
}
}