From b80b30846996ef600c42a85d39bb93ca28050f46 Mon Sep 17 00:00:00 2001 From: Adrien Carpentier Date: Tue, 3 Dec 2024 14:55:52 +0100 Subject: [PATCH] fix: fix types --- frontend/src/components/sidebar/TileTwo.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/sidebar/TileTwo.vue b/frontend/src/components/sidebar/TileTwo.vue index c56a6c7..f3baea7 100644 --- a/frontend/src/components/sidebar/TileTwo.vue +++ b/frontend/src/components/sidebar/TileTwo.vue @@ -30,7 +30,7 @@ export default defineComponent({ setup(props) { const appStore = useAppStore(); - const data = ref(monthNatData["P"]); + const data = ref(monthNatData["P" as keyof typeof monthNatData]); const chartKey = ref(0); const color = ref("#388E3C"); @@ -51,7 +51,7 @@ export default defineComponent({ }); watch(() => appStore.option, (newValue: string) => { - data.value = monthNatData[newValue]; + data.value = monthNatData[newValue as keyof typeof monthNatData]; level.value = "National"; color.value = getColorsForNatureCulture(appStore.option)[3] chartKey.value++;