Skip to content

Commit 36a3d04

Browse files
committed
fix header on mobile
1 parent 835cab7 commit 36a3d04

File tree

4 files changed

+17
-21
lines changed

4 files changed

+17
-21
lines changed

src/components/AppFrame/AppFrame.tsx

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22

33
import Link from 'next/link';
4-
import { AppShell, Group, Button, Container, Modal, Input } from '@mantine/core';
4+
import { AppShell, Group, Button, Container, Modal, Input, Flex, Text } from '@mantine/core';
55
import { useDisclosure } from '@mantine/hooks';
66
import { useState } from 'react';
77
import { ColorSchemeToggle } from '@/src/components/ColorSchemeToggle/ColorSchemeToggle';
@@ -83,24 +83,32 @@ export function AppFrame({ children }: AppFrameProps) {
8383

8484
<AppShell header={{ height: 60 }} padding="">
8585
<AppShell.Header>
86-
<Container px="0.3rem" size="76rem">
86+
<Container h="100%">
8787
<Group h="100%" px="" style={{ justifyContent: 'space-between' }}>
8888
<Button
8989
variant="transparent"
9090
component={Link}
9191
href="/"
9292
className={classes.customLabel}
9393
>
94-
Libra Keeper
94+
<div className="mantine-visible-from-xs">Libra Keeper</div>
95+
<div className="mantine-hidden-from-xs">Libra</div>
9596
</Button>
9697

97-
<div style={{ marginLeft: 'auto', display: 'flex', gap: '2rem' }}>
98-
<Button onClick={open} className={classes.customButtton}>
99-
+Bookshelf
98+
<Flex
99+
h="100%"
100+
gap={{ base: 'xs', sm: 'md' }}
101+
justify="flex-end"
102+
align="center"
103+
direction="row"
104+
wrap="wrap"
105+
>
106+
<Button variant="light" onClick={open}>
107+
Shelf +
100108
</Button>
101109
<GoogleAuthButton />
102110
<ColorSchemeToggle />
103-
</div>
111+
</Flex>
104112
</Group>
105113
</Container>
106114
</AppShell.Header>

src/components/GoogleAuthButton/GoogleAuthButton.module.css

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/components/GoogleAuthButton/GoogleAuthButton.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
'use client';
22

33
import { Button } from '@mantine/core';
4-
// import { IconChevronRight } from '@tabler/icons-react';
54
import { useAuthContext } from '@/src/firebase/context';
6-
import classes from './GoogleAuthButton.module.css';
75

86
function LoginButton() {
97
const { loading, user, signIn, signOut } = useAuthContext();
108

119
return (
1210
<Button
13-
className={classes.customButton}
1411
onClick={user ? signOut : signIn}
1512
variant="subtle"
1613
color="gray"
17-
// size="md"
1814
loading={loading}
1915
loaderProps={{ type: 'dots' }}
20-
// rightSection={<IconChevronRight size="1rem" />}
2116
>
22-
{user ? 'LogOut' : 'LogIn'}
17+
{user ? 'Log Out' : 'Log In'}
2318
</Button>
2419
);
2520
}

src/components/Html5qrcode/QRcodeCamera.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export function QRcodeCamera() {
3939
<div className={classes.customButton}>
4040
<Button
4141
className={classes.customText}
42+
variant="light"
4243
size="42"
4344
component={Link}
4445
href={{ pathname: '/search', query: { q: removeHyphens(scanResult) } }}

0 commit comments

Comments
 (0)