From 19c7ba03c659ea9ae23615b70c07cd01f6ee9f6c Mon Sep 17 00:00:00 2001 From: diced Date: Sat, 14 Jan 2023 13:20:04 -0800 Subject: [PATCH] fix: clean --- src/components/pages/MetadataView.tsx | 4 +--- .../pages/Upload/useUploadOptions.tsx | 19 ++----------------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/components/pages/MetadataView.tsx b/src/components/pages/MetadataView.tsx index 9d83a46..af9f5b4 100644 --- a/src/components/pages/MetadataView.tsx +++ b/src/components/pages/MetadataView.tsx @@ -1,13 +1,11 @@ -import { Button, Center, Group, Skeleton, Stack, Table, TextInput, Title } from '@mantine/core'; +import { Button, Center, Group, Skeleton, Table, TextInput, Title } from '@mantine/core'; import { useClipboard } from '@mantine/hooks'; import { showNotification } from '@mantine/notifications'; import { CopyIcon } from 'components/icons'; import useFetch from 'hooks/useFetch'; -import { useRouter } from 'next/router'; import { useEffect, useState } from 'react'; export default function MetadataView({ fileId }) { - const router = useRouter(); const clipboard = useClipboard(); const [metadata, setMetadata] = useState([]); diff --git a/src/components/pages/Upload/useUploadOptions.tsx b/src/components/pages/Upload/useUploadOptions.tsx index 2542ede..a0e88ff 100644 --- a/src/components/pages/Upload/useUploadOptions.tsx +++ b/src/components/pages/Upload/useUploadOptions.tsx @@ -5,6 +5,7 @@ import { NumberInput, PasswordInput, Select, + SimpleGrid, Stack, Switch, Title, @@ -25,16 +26,6 @@ export default function useUploadOptions(): [ Dispatch>, React.FC ] { - // const [expires, setExpires] = useState('never'); - // const [password, setPassword] = useState(''); - // const [maxViews, setMaxViews] = useState(0); - // const [compression, setCompression] = useState('none'); - // const [zeroWidth, setZeroWidth] = useState(false); - // const [embedded, setEmbedded] = useState(false); - // const [format, setFormat] = useState('default'); - - // migrate this to useReducer - const [state, setState] = useReducer((state, newState) => ({ ...state, ...newState }), { expires: 'never', password: '', @@ -60,7 +51,7 @@ export default function useUploadOptions(): [ }; const OptionsModal: React.FC = () => ( - Upload Options} size='auto' opened={opened} onClose={() => setOpened(false)}> + Upload Options} size='lg' opened={opened} onClose={() => setOpened(false)}> } /> - -