From 262353376cd19bf8f150e329f2b0fad7642999d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 26 Nov 2023 23:35:59 +0100 Subject: [PATCH] Reduced padding on mobile --- front/components/Play/PlayViewControlBar.tsx | 2 -- front/views/PlayView.tsx | 11 ++++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/front/components/Play/PlayViewControlBar.tsx b/front/components/Play/PlayViewControlBar.tsx index 926b0c3..dc16cf8 100644 --- a/front/components/Play/PlayViewControlBar.tsx +++ b/front/components/Play/PlayViewControlBar.tsx @@ -40,7 +40,6 @@ const PlayViewControlBar = ({ return ( ) => { const [type, setType] = useState<'practice' | 'normal'>(); const accessToken = useSelector((state: RootState) => state.user.accessToken); const navigation = useNavigation(); + const screenSize = useBreakpointValue({ base: 'small', md: 'big' }); + const isPhone = screenSize === 'small'; const song = useQuery(API.getSong(songId), { staleTime: Infinity }); const toast = useToast(); const [lastScoreMessage, setLastScoreMessage] = useState(); const webSocket = useRef(); - const bpm = useRef(60); const [paused, setPause] = useState(true); const stopwatch = useStopwatch(); const [time, setTime] = useState(0); @@ -316,7 +315,9 @@ const PlayView = ({ songId, route }: RouteProps) => { style={{ flexGrow: 1, flexDirection: 'column', - padding: 20, + alignItems: 'stretch', + padding: isPhone ? 7 : 20, + gap: isPhone ? 7 : 20, position: 'relative', }} >