From c7dc121d9ec73318f307e616feb74e22b6146126 Mon Sep 17 00:00:00 2001 From: Daniel Soares Date: Mon, 13 Dec 2021 00:36:38 -0300 Subject: [PATCH] feat(wip): add dashboard --- package.json | 2 + .../Dash/DescriptionInput/index.tsx | 21 ++++ src/components/Dash/NameInput/index.tsx | 20 ++++ src/components/Dash/index.tsx | 108 ++++++++++++++++++ src/components/Dash/styles.ts | 26 +++++ src/components/Home/index.tsx | 3 +- src/contexts/DataContext.tsx | 5 +- src/pages/dash.tsx | 5 + src/utils/localStorage.ts | 14 +++ yarn.lock | 7 +- 10 files changed, 208 insertions(+), 3 deletions(-) create mode 100644 src/components/Dash/DescriptionInput/index.tsx create mode 100644 src/components/Dash/NameInput/index.tsx create mode 100644 src/components/Dash/index.tsx create mode 100644 src/components/Dash/styles.ts create mode 100644 src/pages/dash.tsx create mode 100644 src/utils/localStorage.ts diff --git a/package.json b/package.json index 40aa99f..80864b1 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ }, "dependencies": { "@stitches/react": "^1.2.6", + "lodash": "^4.17.21", "next": "12.0.7", "react": "17.0.2", "react-dom": "17.0.2", @@ -23,6 +24,7 @@ "devDependencies": { "@commitlint/cli": "15.0.0", "@commitlint/config-conventional": "15.0.0", + "@types/lodash": "^4.14.178", "@types/node": "16.11.12", "@types/react": "17.0.37", "eslint": "8.4.1", diff --git a/src/components/Dash/DescriptionInput/index.tsx b/src/components/Dash/DescriptionInput/index.tsx new file mode 100644 index 0000000..c008d74 --- /dev/null +++ b/src/components/Dash/DescriptionInput/index.tsx @@ -0,0 +1,21 @@ +import { useData } from '../../../contexts/DataContext' + +export function DescriptionInput() { + const { data, setData } = useData() + + return ( +