mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-07-13 15:21:06 -05:00
Move time updater to main layout
This commit is contained in:
parent
ea609494c5
commit
1c4da3d4d3
|
|
@ -26,16 +26,13 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, onMounted, onUnmounted } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import { useTimeStore } from '../stores/time';
|
||||
|
||||
const announceDate = new Date('2021-02-17');
|
||||
const releaseDate = new Date('2022-09-09');
|
||||
const time = useTimeStore();
|
||||
|
||||
onMounted(() => time.startUpdatingNow());
|
||||
onUnmounted(() => time.stopUpdatingNow());
|
||||
|
||||
const totalTime = releaseDate - announceDate;
|
||||
const remainingTime = computed(() => {
|
||||
// Adjust the time based on midnight local time
|
||||
|
|
|
|||
|
|
@ -32,6 +32,16 @@
|
|||
</main>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, onUnmounted } from 'vue';
|
||||
import { useTimeStore } from '../stores/time';
|
||||
|
||||
const time = useTimeStore();
|
||||
|
||||
onMounted(() => time.startUpdatingNow());
|
||||
onUnmounted(() => time.stopUpdatingNow());
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.footer-links a span {
|
||||
@apply text-gray-300;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user