mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-07-16 09:38:51 +02:00
feat:#22 delete Tanstack update date (no relevance because of caching)
This commit is contained in:
@ -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>
|
||||||
|
Reference in New Issue
Block a user