nuxt-prawo-jazdy/middleware/exam.ts
2025-12-16 20:21:04 +01:00

11 lines
267 B
TypeScript

export default defineNuxtRouteMiddleware(async () => {
const examStore = useExamStore();
const localePath = useLocalePath();
if (examStore.end) {
return localePath('result');
}
if (examStore.category === '') {
return localePath('anomaly');
}
});