Skip to content

Commit

Permalink
ui: change next link to html link and comment out DrawerHeader (#51)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Stankiewicz <[email protected]>
  • Loading branch information
mattystank and mattystank authored Apr 16, 2024
1 parent d3497f0 commit a8af1cb
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions src/components/shared/nav/nav/NavHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { Box, Divider, IconButton } from '@mui/material'
import { Theme } from '@mui/material/styles'

import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'
import ChevronRightIcon from '@mui/icons-material/ChevronRight'
import Divider from '@mui/material/Divider'
import IconButton from '@mui/material/IconButton'
import { Theme, styled } from '@mui/material/styles'

import Image from 'next/image'
import Link from 'next/link'
import { NAV_THICKER_DIVIDER } from '@/constants/navConstants'

const DrawerHeader = styled('div')(({ theme }) => ({
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
padding: theme.spacing(0, 1),
// necessary for content to be below app bar
...theme.mixins.toolbar,
}))
// const DrawerHeader = styled('div')(({ theme }) => ({
// display: 'flex',
// alignItems: 'center',
// justifyContent: 'flex-end',
// padding: theme.spacing(0, 1),
// // necessary for content to be below app bar
// ...theme.mixins.toolbar,
// }))

interface SiteNavHeaderProps {
handleDrawerClose: () => void
Expand All @@ -23,21 +23,28 @@ interface SiteNavHeaderProps {
export default function NavHeader({ handleDrawerClose, theme }: SiteNavHeaderProps) {
return (
<>
<DrawerHeader sx={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
<Link href={'/'} passHref>
<Box
sx={{
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-between',
paddingX: '8px',
paddingY: '8px',
}}
>
<a href="/">
<Image
src="/shared/site-nav-logo.svg"
width={250}
height={42}
alt="SITE logo with text: The hub for testing tools & resources"
priority
// style={{ width: 287, height: 'auto' }}
/>
</Link>
</a>
<IconButton onClick={handleDrawerClose}>
{theme.direction === 'rtl' ? <ChevronRightIcon /> : <ChevronLeftIcon />}
</IconButton>
</DrawerHeader>
</Box>
<Divider sx={{ borderWidth: NAV_THICKER_DIVIDER }} />
</>
)
Expand Down

0 comments on commit a8af1cb

Please sign in to comment.