add native freesr
All checks were successful
Gitea Auto Deploy / Deploy-Container (push) Successful in 1m50s

This commit is contained in:
2025-08-14 12:14:02 +07:00
parent 03affc8593
commit 586241d3ec
3 changed files with 21 additions and 5 deletions

View File

@@ -59,6 +59,7 @@ export default function FreeSRImport() {
const handlerReadFile = (event: React.ChangeEvent<HTMLInputElement>) => {
setIsLoading(true)
const file = event.target.files?.[0];
console.log(event.target.files)
if (!file) {
setSelectedCharacters([])
setFreeSRData(null)
@@ -104,10 +105,11 @@ export default function FreeSRImport() {
})) ?? [],
} as CharacterInfoCardType
}));
} catch {
} catch (e) {
console.log(e)
setSelectedCharacters([])
setFreeSRData(null)
setError(transI18n("fileIsNotAValidFreeSRJsonFile"))
setError(transI18n("fileMustBeAValidJsonFile"))
}
};
reader.readAsText(file);