feat: migrated from chart.js to google-charts

This commit is contained in:
2023-06-10 21:17:16 -03:00
parent e7149f53ff
commit db0d493944
13 changed files with 265 additions and 42 deletions

View File

@@ -1,16 +1,22 @@
/* eslint-disable @typescript-eslint/ban-types */
import { create } from 'zustand';
import { type Tab } from '@/lib/types';
import { type UserSpendData, type Tab } from '@/lib/types';
import { SPEND_SCREEN_ID, SPEND_SCREEN_NAME } from '@/lib/constants';
interface appStore {
tab: Tab;
setTab: (props: Tab) => void;
setUserSpendData: (props: UserSpendData[]) => void;
userSpendData: UserSpendData[];
}
export const useAppStore = create<appStore>((set) => ({
setTab: (props: Tab) => {
set(() => ({ tab: props }));
},
setUserSpendData: (props: UserSpendData[]) => {
set(() => ({ userSpendData: props }));
},
tab: { id: SPEND_SCREEN_ID, title: SPEND_SCREEN_NAME },
userSpendData: [],
}));