Skip to content

Commit

Permalink
fix header on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
potat-dev committed Jul 27, 2024
1 parent 835cab7 commit 36a3d04
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 21 deletions.
22 changes: 15 additions & 7 deletions src/components/AppFrame/AppFrame.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

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

<AppShell header={{ height: 60 }} padding="">
<AppShell.Header>
<Container px="0.3rem" size="76rem">
<Container h="100%">
<Group h="100%" px="" style={{ justifyContent: 'space-between' }}>
<Button
variant="transparent"
component={Link}
href="/"
className={classes.customLabel}
>
Libra Keeper
<div className="mantine-visible-from-xs">Libra Keeper</div>
<div className="mantine-hidden-from-xs">Libra</div>
</Button>

<div style={{ marginLeft: 'auto', display: 'flex', gap: '2rem' }}>
<Button onClick={open} className={classes.customButtton}>
+Bookshelf
<Flex
h="100%"
gap={{ base: 'xs', sm: 'md' }}
justify="flex-end"
align="center"
direction="row"
wrap="wrap"
>
<Button variant="light" onClick={open}>
Shelf +
</Button>
<GoogleAuthButton />
<ColorSchemeToggle />
</div>
</Flex>
</Group>
</Container>
</AppShell.Header>
Expand Down
8 changes: 0 additions & 8 deletions src/components/GoogleAuthButton/GoogleAuthButton.module.css

This file was deleted.

7 changes: 1 addition & 6 deletions src/components/GoogleAuthButton/GoogleAuthButton.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
'use client';

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

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

return (
<Button
className={classes.customButton}
onClick={user ? signOut : signIn}
variant="subtle"
color="gray"
// size="md"
loading={loading}
loaderProps={{ type: 'dots' }}
// rightSection={<IconChevronRight size="1rem" />}
>
{user ? 'LogOut' : 'LogIn'}
{user ? 'Log Out' : 'Log In'}
</Button>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/components/Html5qrcode/QRcodeCamera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export function QRcodeCamera() {
<div className={classes.customButton}>
<Button
className={classes.customText}
variant="light"
size="42"
component={Link}
href={{ pathname: '/search', query: { q: removeHyphens(scanResult) } }}
Expand Down

0 comments on commit 36a3d04

Please sign in to comment.