From 7f6f87273a1f411619bce20071c9694a91c3bef1 Mon Sep 17 00:00:00 2001 From: michyaraque Date: Mon, 5 Feb 2024 16:17:36 +0100 Subject: [PATCH] build: :green_heart: fix build related with wrong types and build options --- package.json | 2 +- src/common/helper/utils.tsx | 2 +- src/common/layout/BaseLayout.tsx | 3 --- .../components/Form/StatsInput/useStatInput.ts | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index cb7d4e6..4742c6d 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dev": "next dev", "ssr": "next build", "start": "next start", - "build": "next build && next export", + "build": "next build", "lint": "eslint \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"", "lint:fix": "eslint --fix \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"", "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"", diff --git a/src/common/helper/utils.tsx b/src/common/helper/utils.tsx index d01b879..9b7458c 100644 --- a/src/common/helper/utils.tsx +++ b/src/common/helper/utils.tsx @@ -34,7 +34,7 @@ export const calculateDocumentSize = async ({ return (decoded.length / 1000000).toFixed(2) + " MB"; } catch (error) { console.error("Error calculating document size:", error); - return null; + return "0 mb"; } }; diff --git a/src/common/layout/BaseLayout.tsx b/src/common/layout/BaseLayout.tsx index dfb0897..3003a17 100644 --- a/src/common/layout/BaseLayout.tsx +++ b/src/common/layout/BaseLayout.tsx @@ -2,14 +2,11 @@ import { ReactNode } from "react"; import { Container } from "@chakra-ui/react"; -import Navbar from "../components/Navbar"; - type BaseLayoutProps = { children: ReactNode }; const BaseLayout = ({ children }: BaseLayoutProps) => { return ( <> - {children} diff --git a/src/features/FoxtrotCardMaker/components/Form/StatsInput/useStatInput.ts b/src/features/FoxtrotCardMaker/components/Form/StatsInput/useStatInput.ts index bf45c83..e5f3202 100644 --- a/src/features/FoxtrotCardMaker/components/Form/StatsInput/useStatInput.ts +++ b/src/features/FoxtrotCardMaker/components/Form/StatsInput/useStatInput.ts @@ -13,7 +13,7 @@ function useStatInput(selector: SelectorProp) { const onInputChange = (event) => { setActualStat(event); - setStats({ [selector]: event }); + setStats({ [selector]: event } as any); }; useEffect(() => {