Something went wrong. Try again.
A simple to-do app focused on tasks that can be completed within a specific time span. taskline.tobinio.dev
Something went wrong. Try again.
12345678910111213141516171819202122232425<script setup lang="ts"> import type { TimePoint, TimeRange } from "~/utils/types"; import TimeDisplayPoint from "./TimeDisplayPoint.vue"; import TimeDisplayRange from "./TimeDisplayRange.vue";
const props = defineProps<{ timeframe: TimeRange | TimePoint }>();
const point = computed(() => { if ("type" in props.timeframe) { return props.timeframe as TimePoint; } });
const range = computed(() => { if ("start" in props.timeframe) { return props.timeframe as TimeRange; } });</script>
<template> <TimeDisplayPoint v-if="point" :point="point" /> <TimeDisplayRange v-if="range" :range="range" /></template>