843606775c
* parallel middlewares foundation + hydration mismatch * moved to fully parallel middlewares * a bit less hacky * some more cleanup * improved nuxt 4 error formatting * make parallel middlewares toggleable
15 lines
355 B
TypeScript
15 lines
355 B
TypeScript
export default defineParallelizedNuxtRouteMiddleware(() => {
|
|
const isWorkspacesEnabled = useIsWorkspacesEnabled()
|
|
|
|
// If workspaces are enabled, continue as normal
|
|
if (isWorkspacesEnabled.value) return
|
|
|
|
// Otherwise, block navigation
|
|
return abortNavigation(
|
|
createError({
|
|
statusCode: 404,
|
|
message: 'Page not found'
|
|
})
|
|
)
|
|
})
|