26 lines
760 B
TypeScript
26 lines
760 B
TypeScript
export default defineNuxtRouteMiddleware((to, from) => {
|
|
// const isMajlesBuild() = import.meta.env.VITE_BUILD_NAME == "majles";
|
|
// console.info(import.meta.env.VITE_BUILD_NAME);
|
|
// console.info(to);
|
|
|
|
// if (isMajlesBuild() && to.path == "/") {
|
|
// return navigateTo("home");
|
|
// }
|
|
// else if (!isMajlesBuild() && to.path == "/")
|
|
// return navigateTo("/monir");
|
|
|
|
return;
|
|
|
|
// return abortNavigation(
|
|
// createError({
|
|
// statusCode:404,
|
|
// message:'some message'
|
|
// })
|
|
// )
|
|
|
|
// In a real app you would probably not redirect every route to `/`
|
|
// however it is important to check `to.path` before redirecting or you
|
|
// might get an infinite redirect loop
|
|
// console.info(import.meta.env.VITE_BUILD_MODULES);
|
|
});
|