fix: ref patrons

This commit is contained in:
ThatOneCalculator 2023-07-26 21:36:13 -07:00
parent 5f9b03f638
commit aea03321ad
No known key found for this signature in database
GPG key ID: 8703CACD01000000

View file

@ -387,7 +387,7 @@
</template>
<script lang="ts" setup>
import { defineAsyncComponent, onMounted, onUnmounted } from "vue";
import { ref, defineAsyncComponent, onMounted, onUnmounted } from "vue";
import calcAge from "s-age";
import cityTimezones from "city-timezones";
import XUserTimeline from "./index.timeline.vue";
@ -422,6 +422,7 @@ let parallaxAnimationId = $ref<null | number>(null);
let narrow = $ref<null | boolean>(null);
let rootEl = $ref<null | HTMLElement>(null);
let bannerEl = $ref<null | HTMLElement>(null);
let patrons = ref([]);
const age = $computed(() => {
return calcAge(props.user.birthday);
@ -467,9 +468,8 @@ const timeForThem = $computed(() => {
return "";
});
let patrons = [];
const patronsResp = await os.api("patrons");
patrons = patronsResp.patrons;
patrons.value = patronsResp.patrons;
function parallaxLoop() {
parallaxAnimationId = window.requestAnimationFrame(parallaxLoop);