feat:#22 delete Tanstack update date (no relevance because of caching)

This commit is contained in:
survellow
2024-08-15 13:27:10 +02:00
parent 4fcfa76e1c
commit 403a2ed155

View File

@ -30,7 +30,7 @@ type Room = {
const queryClient = useQueryClient(); const queryClient = useQueryClient();
const { data: occupancy, dataUpdatedAt: updateDate } = useQuery({ const { data: occupancy } = useQuery({
queryKey: ["roomOccupancy"], queryKey: ["roomOccupancy"],
queryFn: () => fetchRoomOccupancy(), queryFn: () => fetchRoomOccupancy(),
staleTime: 12 * 3600000, // 12 hours staleTime: 12 * 3600000, // 12 hours
@ -116,8 +116,7 @@ watch(selectedRoom, (newRoom: Room) => {
<!--last update date--> <!--last update date-->
<div class="flex align-items-baseline justify-content-end text-right text-xs text-gray-500"> <div class="flex align-items-baseline justify-content-end text-right text-xs text-gray-500">
<span v-if="occupancy">test: {{ $d(occupancy.updated, 'long') }}</span> <span v-if="occupancy">{{ $t("roomFinderPage.lastUpdate") }}: {{ $d(occupancy.updated, 'long') }}</span>
<span>{{ $t("roomFinderPage.lastUpdate") }}: {{ $d(new Date(updateDate), 'long') }}</span>
<Button size="small" @click="refetchRoomOccupancy" icon="pi pi-refresh" class="p-button-text p-button-sm" /> <Button size="small" @click="refetchRoomOccupancy" icon="pi pi-refresh" class="p-button-text p-button-sm" />
</div> </div>
</template> </template>