Added Redirect to mobile Index
This commit is contained in:
9
middleware/redirectToMobileIndex.ts
Normal file
9
middleware/redirectToMobileIndex.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export default defineNuxtRouteMiddleware(async (to, _from) => {
|
||||
const router = useRouter()
|
||||
|
||||
console.log(await useCapacitor().getIsPhone())
|
||||
|
||||
if(await useCapacitor().getIsPhone()) {
|
||||
return router.push('/mobile')
|
||||
}
|
||||
})
|
||||
@@ -62,6 +62,11 @@
|
||||
|
||||
<script setup>
|
||||
|
||||
definePageMeta({
|
||||
middleware: 'redirect-to-mobile-index'
|
||||
})
|
||||
|
||||
|
||||
import DisplayPresentProfiles from "~/components/noAutoLoad/displayPresentProfiles.vue";
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user