From f5e9657842da3630e777b85cb9195caec28b1d93 Mon Sep 17 00:00:00 2001 From: Eric van der Vlist Date: Mon, 3 Apr 2023 14:46:41 +0200 Subject: [PATCH] Refactoring to prepare jpg imports --- src/components/import/ImportSingleFile.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/import/ImportSingleFile.tsx b/src/components/import/ImportSingleFile.tsx index 098c07b..831ec37 100644 --- a/src/components/import/ImportSingleFile.tsx +++ b/src/components/import/ImportSingleFile.tsx @@ -61,14 +61,14 @@ const ImportSingleFile: Component = ({ file: file }) => { const parseGpx = (content: string) => { const gpx = GPX.parse(content); - console.log({ caller: 'GpxImportSingleFile / JSON', gpxFile: file, gpx }); + console.log({ caller: 'ImportSingleFile / JSON', gpxFile: file, gpx }); setStatsAndGpx({ gpx, stats: analyzeGpx(gpx) }); }; if (typeof file === 'string') { CapacitorFileSystem.requestPermissions().then((permissionStatus) => { console.log({ - caller: 'GpxImportSingleFile / content', + caller: 'ImportSingleFile / content', permissionStatus, }); }); @@ -77,8 +77,8 @@ const ImportSingleFile: Component = ({ file: file }) => { encoding: Encoding.UTF8, }).then((content) => { console.log({ - caller: 'GpxImportSingleFile / content', - gpxFile: file, + caller: 'ImportSingleFile / content', + file, content, }); parseGpx(content.data); @@ -91,7 +91,7 @@ const ImportSingleFile: Component = ({ file: file }) => { async () => { // this will then display a text gpxfile console.log({ - caller: 'GpxImportSingleFile / XML', + caller: 'ImportSingleFile / XML', gpxFile: file, result: gpxReader.result, });