<script setup lang="ts">
import { useRouter } from "vue-router"
import Home from "./_home.vue"

const router = useRouter()

onMounted(() => {
	// 如果是移动设备，跳转到移动端主页
	if (isMobile()) {
		router.replace("/m-home")
		return
	}
	document.querySelector("body")?.classList.add("is-home")
})
onBeforeUnmount(() => {
	document.querySelector("body")?.classList.remove("is-home")
})
</script>

<template>
	<div>
		<Home />
	</div>
</template>
