Remodel for Mobile
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
export default defineNuxtRouteMiddleware(async (to, _from) => {
|
||||
const router = useRouter()
|
||||
|
||||
console.log(await useCapacitor().getIsPhone())
|
||||
console.log(useCapacitor().getIsNative())
|
||||
|
||||
if(await useCapacitor().getIsPhone() && _from.path !== '/mobile') {
|
||||
if(useCapacitor().getIsNative() && _from.path !== '/mobile') {
|
||||
return router.push('/mobile')
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user