hippofish/packages/client/src/pages/explore.featured.vue
ThatOneCalculator 1f7ddc9d7c
refactor: ♻️ No Vue Reactivity
Performed with https://github.com/edison1105/drop-reactivity-transform , Reactivity Transform was an experimental feature and has now been deprecated.
2023-08-11 17:44:46 -07:00

49 lines
1 KiB
Vue

<template>
<MkSpacer :content-max="800">
<MkTab v-model="tab" style="margin-bottom: var(--margin)">
<option value="local">{{ i18n.ts.local }}</option>
<option value="remote">{{ i18n.ts.remote }}</option>
</MkTab>
<XNotes v-if="tab === 'local'" :pagination="paginationForLocal" />
<XNotes
v-else-if="tab === 'remote'"
:pagination="paginationForRemote"
/>
</MkSpacer>
</template>
<script lang="ts" setup>
import { ref } from "vue";
import XNotes from "@/components/MkNotes.vue";
import MkTab from "@/components/MkTab.vue";
import { i18n } from "@/i18n";
const paginationForLocal = {
endpoint: "notes/featured" as const,
limit: 15,
origin: "local",
offsetMode: true,
params: {
days: 5,
},
};
const paginationForRemote = {
endpoint: "notes/featured" as const,
limit: 15,
offsetMode: true,
params: {
origin: "remote",
days: 5,
},
};
// const paginationForRemote = {
// endpoint: 'notes/polls/recommendation' as const,
// limit: 10,
// offsetMode: true,
// };
let tab = ref("local");
</script>