Forecast fixes
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user