mirror of
https://github.com/FranP-code/spend-ia.git
synced 2025-10-13 00:14:09 +00:00
feat: added seed
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import Chart from 'react-google-charts';
|
||||
import styled, { useTheme } from 'styled-components';
|
||||
import { capitalize } from 'utils';
|
||||
import { type Theme } from '@/lib/theme';
|
||||
import { type PieCircleData } from '@/lib/types';
|
||||
import { capitalize } from '@/lib/utils';
|
||||
|
||||
export const PieCircle = (props: { pieCircleData: PieCircleData }): JSX.Element => {
|
||||
const { pieCircleData } = props;
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
export const SPEND_SCREEN_ID = 'spend-screen';
|
||||
export const SPEND_SCREEN_NAME = 'Spend';
|
||||
export const APP_NAME = 'SpendIA';
|
||||
@@ -1,12 +1,12 @@
|
||||
/* eslint-disable @typescript-eslint/ban-types */
|
||||
import { create } from 'zustand';
|
||||
import { SPEND_SCREEN_ID, SPEND_SCREEN_NAME } from 'utils/constants';
|
||||
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;
|
||||
tab: Tab;
|
||||
userSpendData: UserSpendData[];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable typescript-sort-keys/interface */
|
||||
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
||||
export interface Theme {
|
||||
colors: {
|
||||
|
||||
2
packages/client/lib/types.d.ts
vendored
2
packages/client/lib/types.d.ts
vendored
@@ -9,8 +9,8 @@ interface Currency {
|
||||
}
|
||||
|
||||
interface Category {
|
||||
label: string;
|
||||
backgroundColor: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export interface UserSpendData {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export const capitalize = (str: string): string => str.charAt(0).toUpperCase() + str.slice(1);
|
||||
@@ -1,13 +1,8 @@
|
||||
{
|
||||
"name": "spendia",
|
||||
"name": "client",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts.backup": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "next dev -p 8080",
|
||||
"build": "next build",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import Head from 'next/head';
|
||||
import styled, { ThemeProvider } from 'styled-components';
|
||||
import { APP_NAME, SPEND_SCREEN_ID } from 'utils/constants';
|
||||
import { Header, SpendScreen } from '@/screens';
|
||||
import { type Tab } from '@/lib/types';
|
||||
import { APP_NAME, SPEND_SCREEN_ID } from '@/lib/constants';
|
||||
import { useAppStore } from '@/lib/storage';
|
||||
import theme from '@/lib/theme';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SPEND_SCREEN_ID, SPEND_SCREEN_NAME } from '../../lib/constants';
|
||||
import { SPEND_SCREEN_ID, SPEND_SCREEN_NAME } from 'utils/constants';
|
||||
import { type Tab } from '../../lib/types';
|
||||
|
||||
export const tabs: Tab[] = [
|
||||
|
||||
@@ -4,7 +4,7 @@ import { PieCircle } from '@/components';
|
||||
import { type Theme } from '@/lib/theme';
|
||||
import { useAppStore } from '@/lib/storage';
|
||||
import { type PieCircleData } from '@/lib/types';
|
||||
import { trpc } from '../../trpc';
|
||||
import { trpc } from '@/trpc';
|
||||
|
||||
export const SpendScreen = (): JSX.Element => {
|
||||
const userSpendData = useAppStore((state) => state.userSpendData);
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"files": [
|
||||
"../server/app.ts"
|
||||
],
|
||||
"files": ["../server/app.ts"],
|
||||
"compilerOptions": {
|
||||
"rootDir": "../",
|
||||
"composite": true,
|
||||
"target": "ESNext",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": [
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ESNext"
|
||||
],
|
||||
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||
"allowJs": false,
|
||||
"skipLibCheck": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
@@ -27,9 +21,7 @@
|
||||
"incremental": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"./*"
|
||||
]
|
||||
"@/*": ["./*"]
|
||||
},
|
||||
"plugins": [
|
||||
{
|
||||
@@ -51,8 +43,5 @@
|
||||
"path": "./tsconfig.node.json"
|
||||
}
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"../server/app.ts"
|
||||
]
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user