nidus-sync/ts/rmo/view/district/Home.vue

38 lines
931 B
Vue
Raw Normal View History

2026-04-03 18:28:41 +00:00
<style scoped>
.district-logo {
display: block;
margin-left: auto;
margin-right: auto;
max-height: 88px;
width: auto;
}
</style>
<template>
<Home :slug="slug">
<template #header>
<!-- Introduction Section -->
<HeaderDistrict :district="district" />
</template>
</Home>
</template>
<script setup lang="ts">
import { ref } from "vue";
2026-04-03 18:28:41 +00:00
import { computedAsync } from "@vueuse/core";
import Home from "@/rmo/content/Home.vue";
2026-04-03 18:28:41 +00:00
import type { District } from "@/rmo/type";
import { useDistrictStore } from "@/rmo/store/district";
import HeaderDistrict from "@/components/HeaderDistrict.vue";
2026-04-03 18:28:41 +00:00
interface Props {
slug: string;
}
2026-04-03 18:28:41 +00:00
const props = defineProps<Props>();
const districtStore = useDistrictStore();
const district = computedAsync(async (): Promise<District | undefined> => {
2026-04-03 18:28:41 +00:00
const districts = await districtStore.get();
return districts.find((district: District) => district.slug == props.slug);
2026-04-03 18:28:41 +00:00
});
</script>