From fadeccc7f312ac68e17c5574c2c96a2c1b3752a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjarne=20=C3=98verli?= Date: Tue, 23 Aug 2022 21:18:50 +0200 Subject: [PATCH] feat: improve the ux for the landing page --- src/client/routes/home/index.js | 141 +++++++++++++++----------------- 1 file changed, 65 insertions(+), 76 deletions(-) diff --git a/src/client/routes/home/index.js b/src/client/routes/home/index.js index dfe87b37..ec88b4ff 100644 --- a/src/client/routes/home/index.js +++ b/src/client/routes/home/index.js @@ -15,10 +15,11 @@ import { Stack, Title, Text, - Collapse, Divider, FileButton, } from '@mantine/core'; + +import { useMediaQuery } from '@mantine/hooks'; import { IconSquarePlus, IconTrash, @@ -27,7 +28,6 @@ import { IconLink, IconCopy, IconCheck, - IconSettings, IconHeading, } from '@tabler/icons'; @@ -53,13 +53,14 @@ const Home = () => { const [formData, setFormData] = useState(new FormData()); const [secretId, setSecretId] = useState(''); const [encryptionKey, setEncryptionKey] = useState(''); - const [settings, setOpenSettings] = useState(false); const [error, setError] = useState(''); const [secretError, setSecretError] = useState(''); const secretRef = useRef(null); + const isMobile = useMediaQuery('(max-width: 915px)'); + useEffect(() => { if (secretId) { secretRef.current.focus(); @@ -218,17 +219,19 @@ const Home = () => { error={secretError} /> - } - placeholder="Title" - value={title} - onChange={onTitleChange} - readOnly={inputReadOnly} - /> + + } + placeholder="Title" + value={title} + onChange={onTitleChange} + readOnly={inputReadOnly} + /> -