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"))