From 9b3814644341199d84df106eae36554d308489e9 Mon Sep 17 00:00:00 2001 From: AzenKain Date: Thu, 21 Aug 2025 10:11:23 +0700 Subject: [PATCH] Remove optimaze image --- next.config.ts | 1 + src/components/header/index.tsx | 3 +-- src/components/importBar/freesr.tsx | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/next.config.ts b/next.config.ts index b00e894..303687e 100644 --- a/next.config.ts +++ b/next.config.ts @@ -8,6 +8,7 @@ const nextConfig: NextConfig = { reactStrictMode: false, output: 'standalone', images: { + unoptimized: true, remotePatterns: [ { protocol: 'https', diff --git a/src/components/header/index.tsx b/src/components/header/index.tsx index ba61ec5..0438b74 100644 --- a/src/components/header/index.tsx +++ b/src/components/header/index.tsx @@ -174,8 +174,7 @@ export default function Header() { setCeConfig(parsed.ce_config) setPeakConfig(parsed.peak_config) toast.success(transI18n("importDatabaseSuccess")) - } catch (e) { - console.log(e) + } catch { toast.error(transI18n("fileMustBeAValidJsonFile")) } }; diff --git a/src/components/importBar/freesr.tsx b/src/components/importBar/freesr.tsx index 2f0c5b5..0b64be7 100644 --- a/src/components/importBar/freesr.tsx +++ b/src/components/importBar/freesr.tsx @@ -59,7 +59,6 @@ export default function FreeSRImport() { const handlerReadFile = (event: React.ChangeEvent) => { setIsLoading(true) const file = event.target.files?.[0]; - console.log(event.target.files) if (!file) { setSelectedCharacters([]) setFreeSRData(null) @@ -105,8 +104,8 @@ export default function FreeSRImport() { })) ?? [], } as CharacterInfoCardType })); - } catch (e) { - console.log(e) + } catch { + setSelectedCharacters([]) setFreeSRData(null) setError(transI18n("fileMustBeAValidJsonFile"))