From 2d99bc1265f6371eded9e1260b184974d03a2c6b Mon Sep 17 00:00:00 2001 From: Viktor Kuzhelnyi Date: Wed, 14 Sep 2022 19:44:13 +0500 Subject: [PATCH] fix: lint config; fix: ts & lint errors --- .eslintrc.cjs | 6 + .eslintrc.json | 3 - components/AsideMenu.tsx | 2 +- components/AsideMenuLayer.tsx | 2 +- components/BaseButton.tsx | 2 +- components/BaseButtons.tsx | 2 +- components/CardBox.tsx | 2 +- components/CardBoxClient.tsx | 2 +- components/CardBoxTransaction.tsx | 2 +- .../{CardBoxWIdget.tsx => CardBoxWidget.tsx} | 1 - components/NavBar.tsx | 4 +- components/NavBarItem.tsx | 2 +- components/NavBarItemPlain.tsx | 10 +- components/OverlayLayer.tsx | 2 +- components/PillTagTrend.tsx | 1 - components/SectionFullScreen.tsx | 2 +- components/UserAvatar.tsx | 2 +- package-lock.json | 202 +++++++++++++++++- package.json | 7 +- pages/_app.tsx | 2 +- pages/dashboard.tsx | 6 +- src/config.ts | 2 +- 22 files changed, 226 insertions(+), 40 deletions(-) create mode 100644 .eslintrc.cjs delete mode 100644 .eslintrc.json rename components/{CardBoxWIdget.tsx => CardBoxWidget.tsx} (97%) diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..ba4022b --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,6 @@ +module.exports = { + extends: ["next/core-web-vitals", "eslint-config-prettier", 'eslint:recommended', 'plugin:@typescript-eslint/recommended'], + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + root: true, +}; \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 4d765f2..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["next/core-web-vitals", "prettier"] -} diff --git a/components/AsideMenu.tsx b/components/AsideMenu.tsx index 275a17a..442dfac 100644 --- a/components/AsideMenu.tsx +++ b/components/AsideMenu.tsx @@ -7,7 +7,7 @@ type Props = { menu: MenuAsideItem[] isAsideMobileExpanded: boolean isAsideLgActive: boolean - onAsideLgClose: Function + onAsideLgClose: () => void } export default function AsideMenu({ diff --git a/components/AsideMenuLayer.tsx b/components/AsideMenuLayer.tsx index b72ec0b..f6f2048 100644 --- a/components/AsideMenuLayer.tsx +++ b/components/AsideMenuLayer.tsx @@ -9,7 +9,7 @@ import { useAppSelector } from '../src/stores/hooks' type Props = { menu: MenuAsideItem[] className?: string - onAsideLgCloseClick: Function + onAsideLgCloseClick: () => void } export default function AsideMenuLayer({ menu, className = '', ...props }: Props) { diff --git a/components/BaseButton.tsx b/components/BaseButton.tsx index 8261152..16431aa 100644 --- a/components/BaseButton.tsx +++ b/components/BaseButton.tsx @@ -20,7 +20,7 @@ type Props = { disabled?: boolean roundedFull?: boolean isGrouped?: boolean - onClick?: Function + onClick?: (e: React.MouseEvent) => void } export default function BaseButton({ diff --git a/components/BaseButtons.tsx b/components/BaseButtons.tsx index 8166c8e..7c22a64 100644 --- a/components/BaseButtons.tsx +++ b/components/BaseButtons.tsx @@ -1,4 +1,4 @@ -import React, { Children, cloneElement, ReactNode } from 'react' +import React, { ReactNode } from 'react' type Props = { type?: string diff --git a/components/CardBox.tsx b/components/CardBox.tsx index 1c58d76..2caa3f2 100644 --- a/components/CardBox.tsx +++ b/components/CardBox.tsx @@ -13,7 +13,7 @@ type Props = { isModal?: boolean children: ReactNode footer?: ReactNode - onClick?: Function + onClick?: (e: React.MouseEvent) => void } export default function CardBox({ diff --git a/components/CardBoxClient.tsx b/components/CardBoxClient.tsx index 0adfe22..238b2d1 100644 --- a/components/CardBoxClient.tsx +++ b/components/CardBoxClient.tsx @@ -1,6 +1,6 @@ import { mdiTrendingDown, mdiTrendingNeutral, mdiTrendingUp } from '@mdi/js' import React from 'react' -import { Client, ColorKey } from '../interfaces' +import { Client } from '../interfaces' import BaseLevel from './BaseLevel' import CardBox from './CardBox' import PillTag from './PillTag' diff --git a/components/CardBoxTransaction.tsx b/components/CardBoxTransaction.tsx index 53c2516..73b3469 100644 --- a/components/CardBoxTransaction.tsx +++ b/components/CardBoxTransaction.tsx @@ -1,6 +1,6 @@ import { mdiCashMinus, mdiCashPlus, mdiCreditCard, mdiReceipt } from '@mdi/js' import React from 'react' -import { ColorKey, Transaction } from '../interfaces' +import { Transaction } from '../interfaces' import BaseLevel from './BaseLevel' import CardBox from './CardBox' import IconRounded from './IconRounded' diff --git a/components/CardBoxWIdget.tsx b/components/CardBoxWidget.tsx similarity index 97% rename from components/CardBoxWIdget.tsx rename to components/CardBoxWidget.tsx index 120ee95..f93ec99 100644 --- a/components/CardBoxWIdget.tsx +++ b/components/CardBoxWidget.tsx @@ -6,7 +6,6 @@ import BaseButton from './BaseButton' import BaseIcon from './BaseIcon' import BaseLevel from './BaseLevel' import CardBox from './CardBox' -import NumberDynamic from './NumberDynamic' import PillTagTrend from './PillTagTrend' type Props = { diff --git a/components/NavBar.tsx b/components/NavBar.tsx index 22b9952..f7979f9 100644 --- a/components/NavBar.tsx +++ b/components/NavBar.tsx @@ -15,9 +15,7 @@ type Props = { export default function NavBar({ menu, className = '', children }: Props) { const [isMenuNavBarActive, setIsMenuNavBarActive] = useState(false) - const handleMenuNavBarToggleClick = (e: MouseEvent) => { - e.preventDefault() - + const handleMenuNavBarToggleClick = () => { setIsMenuNavBarActive(!isMenuNavBarActive) } diff --git a/components/NavBarItem.tsx b/components/NavBarItem.tsx index 08c1734..47699d4 100644 --- a/components/NavBarItem.tsx +++ b/components/NavBarItem.tsx @@ -38,7 +38,7 @@ export default function NavBarItem({ item }: Props) { const itemLabel = item.isCurrentUser ? userName : item.label - const handleMenuClick = (e: React.MouseEvent) => { + const handleMenuClick = () => { if (item.menu) { setIsDropdownActive(!isDropdownActive) } diff --git a/components/NavBarItemPlain.tsx b/components/NavBarItemPlain.tsx index c1a888f..dc1a723 100644 --- a/components/NavBarItemPlain.tsx +++ b/components/NavBarItemPlain.tsx @@ -5,7 +5,7 @@ type Props = { display?: string useMargin?: boolean children: ReactNode - onClick?: Function + onClick?: (e: React.MouseEvent) => void } export default function NavBarItemPlain({ @@ -22,14 +22,8 @@ export default function NavBarItemPlain({ useMargin ? 'my-2 mx-3' : 'py-2 px-3' }` - const handleClick = (e: React.MouseEvent) => { - if (onClick) { - onClick(e) - } - } - return ( -
+
{children}
) diff --git a/components/OverlayLayer.tsx b/components/OverlayLayer.tsx index a5df794..eb05e80 100644 --- a/components/OverlayLayer.tsx +++ b/components/OverlayLayer.tsx @@ -5,7 +5,7 @@ type Props = { zIndex?: string type?: string children?: ReactNode - onClick: Function + onClick: (e: React.MouseEvent) => void } export default function OverlayLayer({ diff --git a/components/PillTagTrend.tsx b/components/PillTagTrend.tsx index 4a9a067..56a0eb3 100644 --- a/components/PillTagTrend.tsx +++ b/components/PillTagTrend.tsx @@ -4,7 +4,6 @@ import { mdiChevronDown, mdiAlertCircleOutline, mdiInformationOutline, - mdiCheckAll, mdiCheckCircleOutline, mdiAlertOutline, } from '@mdi/js' diff --git a/components/SectionFullScreen.tsx b/components/SectionFullScreen.tsx index 246d0f7..94f5765 100644 --- a/components/SectionFullScreen.tsx +++ b/components/SectionFullScreen.tsx @@ -8,7 +8,7 @@ type Props = { children: ReactNode } -export default function SectionFullScreen({ bg, children }) { +export default function SectionFullScreen({ bg, children }: Props) { const darkMode = useAppSelector((state) => state.style.darkMode) let componentClass = 'flex min-h-screen items-center justify-center ' diff --git a/components/UserAvatar.tsx b/components/UserAvatar.tsx index ffeba97..bef1aed 100644 --- a/components/UserAvatar.tsx +++ b/components/UserAvatar.tsx @@ -1,5 +1,5 @@ /* eslint-disable @next/next/no-img-element */ -// Why disabled: +// Why disabled: // avatars.dicebear.com provides svg avatars // next/image needs dangerouslyAllowSVG option for that diff --git a/package-lock.json b/package-lock.json index 8d8af04..aa92156 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,14 +21,17 @@ "@tailwindcss/line-clamp": "^0.4.0", "@types/node": "18.7.16", "@types/react-redux": "^7.1.24", + "@typescript-eslint/eslint-plugin": "^5.37.0", + "@typescript-eslint/parser": "^5.37.0", "autoprefixer": "^10.4.0", - "eslint": "^8.23.0", + "eslint": "^8.23.1", "eslint-config-next": "12.2.5", "eslint-config-prettier": "^8.5.0", "postcss": "^8.4.4", "postcss-import": "^14.1.0", "prettier": "^2.7.1", - "tailwindcss": "^3.0.0" + "tailwindcss": "^3.0.0", + "typescript": "^4.8.3" } }, "node_modules/@babel/runtime": { @@ -437,6 +440,12 @@ "hoist-non-react-statics": "^3.3.0" } }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -486,6 +495,39 @@ "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.37.0.tgz", + "integrity": "sha512-Fde6W0IafXktz1UlnhGkrrmnnGpAo1kyX7dnyHHVrmwJOn72Oqm3eYtddrpOwwel2W8PAK9F3pIL5S+lfoM0og==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.37.0", + "@typescript-eslint/type-utils": "5.37.0", + "@typescript-eslint/utils": "5.37.0", + "debug": "^4.3.4", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.2.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/@typescript-eslint/parser": { "version": "5.37.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.37.0.tgz", @@ -530,6 +572,33 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.37.0.tgz", + "integrity": "sha512-BSx/O0Z0SXOF5tY0bNTBcDEKz2Ec20GVYvq/H/XNKiUorUFilH7NPbFUuiiyzWaSdN3PA8JV0OvYx0gH/5aFAQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "5.37.0", + "@typescript-eslint/utils": "5.37.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/@typescript-eslint/types": { "version": "5.37.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.37.0.tgz", @@ -570,6 +639,52 @@ } } }, + "node_modules/@typescript-eslint/utils": { + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.37.0.tgz", + "integrity": "sha512-jUEJoQrWbZhmikbcWSMDuUSxEE7ID2W/QCV/uz10WtQqfOuKZUqFGjqLJ+qhDd17rjgp+QJPqTdPIBWwoob2NQ==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.37.0", + "@typescript-eslint/types": "5.37.0", + "@typescript-eslint/typescript-estree": "5.37.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/@typescript-eslint/visitor-keys": { "version": "5.37.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.37.0.tgz", @@ -1899,6 +2014,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true + }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -3710,7 +3831,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", "dev": true, - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4104,6 +4224,12 @@ "hoist-non-react-statics": "^3.3.0" } }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -4153,6 +4279,23 @@ "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" }, + "@typescript-eslint/eslint-plugin": { + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.37.0.tgz", + "integrity": "sha512-Fde6W0IafXktz1UlnhGkrrmnnGpAo1kyX7dnyHHVrmwJOn72Oqm3eYtddrpOwwel2W8PAK9F3pIL5S+lfoM0og==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.37.0", + "@typescript-eslint/type-utils": "5.37.0", + "@typescript-eslint/utils": "5.37.0", + "debug": "^4.3.4", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.2.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, "@typescript-eslint/parser": { "version": "5.37.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.37.0.tgz", @@ -4175,6 +4318,18 @@ "@typescript-eslint/visitor-keys": "5.37.0" } }, + "@typescript-eslint/type-utils": { + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.37.0.tgz", + "integrity": "sha512-BSx/O0Z0SXOF5tY0bNTBcDEKz2Ec20GVYvq/H/XNKiUorUFilH7NPbFUuiiyzWaSdN3PA8JV0OvYx0gH/5aFAQ==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "5.37.0", + "@typescript-eslint/utils": "5.37.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + } + }, "@typescript-eslint/types": { "version": "5.37.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.37.0.tgz", @@ -4196,6 +4351,38 @@ "tsutils": "^3.21.0" } }, + "@typescript-eslint/utils": { + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.37.0.tgz", + "integrity": "sha512-jUEJoQrWbZhmikbcWSMDuUSxEE7ID2W/QCV/uz10WtQqfOuKZUqFGjqLJ+qhDd17rjgp+QJPqTdPIBWwoob2NQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.37.0", + "@typescript-eslint/types": "5.37.0", + "@typescript-eslint/typescript-estree": "5.37.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "dependencies": { + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + } + } + }, "@typescript-eslint/visitor-keys": { "version": "5.37.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.37.0.tgz", @@ -5172,6 +5359,12 @@ "functions-have-names": "^1.2.2" } }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true + }, "functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -6398,8 +6591,7 @@ "version": "4.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", - "dev": true, - "peer": true + "dev": true }, "unbox-primitive": { "version": "1.0.2", diff --git a/package.json b/package.json index dde01da..040ed12 100644 --- a/package.json +++ b/package.json @@ -24,13 +24,16 @@ "@tailwindcss/line-clamp": "^0.4.0", "@types/node": "18.7.16", "@types/react-redux": "^7.1.24", + "@typescript-eslint/eslint-plugin": "^5.37.0", + "@typescript-eslint/parser": "^5.37.0", "autoprefixer": "^10.4.0", - "eslint": "^8.23.0", + "eslint": "^8.23.1", "eslint-config-next": "12.2.5", "eslint-config-prettier": "^8.5.0", "postcss": "^8.4.4", "postcss-import": "^14.1.0", "prettier": "^2.7.1", - "tailwindcss": "^3.0.0" + "tailwindcss": "^3.0.0", + "typescript": "^4.8.3" } } diff --git a/pages/_app.tsx b/pages/_app.tsx index ce60f64..887251b 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -7,7 +7,7 @@ import { store } from '../src/stores/store' import { Provider } from 'react-redux' import '../styles/main.css' -export type NextPageWithLayout

= NextPage & { +export type NextPageWithLayout

, IP = P> = NextPage & { getLayout?: (page: ReactElement) => ReactNode } diff --git a/pages/dashboard.tsx b/pages/dashboard.tsx index c3a16a2..4949b0a 100644 --- a/pages/dashboard.tsx +++ b/pages/dashboard.tsx @@ -5,18 +5,16 @@ import { mdiChartTimelineVariant, mdiGithub, mdiMonitorCellphone, - mdiRead, mdiReload, } from '@mdi/js' import Head from 'next/head' -import React, { useEffect, useState } from 'react' +import React, { useState } from 'react' import type { ReactElement } from 'react' import BaseButton from '../components/BaseButton' import LayoutAuthenticated from '../components/layouts/Authenticated' import SectionMain from '../components/SectionMain' import SectionTitleLineWithButton from '../components/SectionTitleLineWithButton' -import CardBoxWidget from '../components/CardBoxWIdget' -import NumberDynamic from '../components/NumberDynamic' +import CardBoxWidget from '../components/CardBoxWidget' import { useSampleClients, useSampleTransactions } from '../hooks/sampleData' import CardBoxTransaction from '../components/CardBoxTransaction' import { Client, Transaction } from '../interfaces' diff --git a/src/config.ts b/src/config.ts index 6c74c79..4ed4298 100644 --- a/src/config.ts +++ b/src/config.ts @@ -4,4 +4,4 @@ export const localStorageStyleKey = 'style' export const containerMaxW = 'xl:max-w-6xl xl:mx-auto' -export const appTitle = 'Free Tailwind React Next dashboard template' +export const appTitle = 'Free Tailwind 3 React Next Typescript dashboard template'