Forecast fixes

This commit is contained in:
2026-06-24 19:18:35 -04:00
parent fdb752073f
commit 82c10d9278
8 changed files with 34 additions and 113 deletions

View File

@@ -1,9 +1,10 @@
<script setup lang="ts">
import Loading from '@/components/Loading.vue';
import {formatDate} from '@ztimson/utils';
import {BASE, type DataRow} from '../services/api';
import {onMounted, ref} from 'vue';
import {api, BASE} from '../services/api';
const props = withDefaults(defineProps<{ days: DataRow[] }>(), {});
const days = ref<any[]>()
const filler = [1, 2, 3, 4, 5];
function dir(deg: number) {
@@ -16,6 +17,13 @@ function dir(deg: number) {
if(deg > 292.5 && deg <= 337.5) return 'NW';
return 'N';
}
onMounted(async () => {
const start = new Date(), end = new Date();
start.setDate(start.getDate() + 1);
end.setDate(end.getDate() + 5);
days.value = await api.daily(start, end);
})
</script>
<style scoped lang="scss">