Updates to account, ui, etc
This commit is contained in:
@@ -25,4 +25,4 @@
|
||||
font-size: var(--mantine-font-size-sm);
|
||||
color: var(--mantine-color-dimmed);
|
||||
margin-top: var(--mantine-spacing-xs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ export function AirportDrop() {
|
||||
setLoading(true);
|
||||
try {
|
||||
const formData = new FormData();
|
||||
files.forEach(file => {
|
||||
files.forEach((file) => {
|
||||
formData.append('files', file, file.name);
|
||||
})
|
||||
});
|
||||
await importAirports(formData);
|
||||
} catch (error) {
|
||||
console.error('Upload error:', error);
|
||||
@@ -31,12 +31,12 @@ export function AirportDrop() {
|
||||
}
|
||||
}}
|
||||
className={classes.dropzone}
|
||||
radius="md"
|
||||
radius='md'
|
||||
accept={['application/JSON']}
|
||||
maxSize={30 * 1024 ** 2}
|
||||
>
|
||||
<div style={{ pointerEvents: 'none' }}>
|
||||
<Group justify="center">
|
||||
<Group justify='center'>
|
||||
<Dropzone.Accept>
|
||||
<IconDownload size={50} color={theme.colors.blue[6]} stroke={1.5} />
|
||||
</Dropzone.Accept>
|
||||
@@ -48,22 +48,22 @@ export function AirportDrop() {
|
||||
</Dropzone.Idle>
|
||||
</Group>
|
||||
|
||||
<Text ta="center" fw={700} fz="lg" mt="xl">
|
||||
<Text ta='center' fw={700} fz='lg' mt='xl'>
|
||||
<Dropzone.Accept>Drop files here</Dropzone.Accept>
|
||||
<Dropzone.Reject>Json file less than 30mb</Dropzone.Reject>
|
||||
<Dropzone.Idle>Upload JSON</Dropzone.Idle>
|
||||
</Text>
|
||||
|
||||
<Text className={classes.description}>
|
||||
Drag'n'drop files here to upload. We can accept only <i>.json</i> files that
|
||||
are less than 30mb in size.
|
||||
Drag'n'drop files here to upload. We can accept only <i>.json</i> files that are less than 30mb in
|
||||
size.
|
||||
</Text>
|
||||
</div>
|
||||
</Dropzone>
|
||||
|
||||
<Button className={classes.control} size="md" radius="xl" onClick={() => openRef.current?.()}>
|
||||
<Button className={classes.control} size='md' radius='xl' onClick={() => openRef.current?.()}>
|
||||
Select files
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user