Refactoring to prepare jpg imports

This commit is contained in:
Eric van der Vlist 2023-04-03 14:46:41 +02:00
parent 9863efc26a
commit f5e9657842
1 changed files with 5 additions and 5 deletions

View File

@ -61,14 +61,14 @@ const ImportSingleFile: Component<Props> = ({ 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<Props> = ({ 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<Props> = ({ file: file }) => {
async () => {
// this will then display a text gpxfile
console.log({
caller: 'GpxImportSingleFile / XML',
caller: 'ImportSingleFile / XML',
gpxFile: file,
result: gpxReader.result,
});