Refactoring components

This commit is contained in:
Hazem Krimi
2023-03-19 18:21:12 +01:00
parent b82f90db48
commit 3a51b7fdb2
26 changed files with 171 additions and 158 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import { FC, useContext, useState } from 'react';
import { useContext, useState } from 'react';
import { ThemeContext } from '../../styles/theme';
import { Bar } from './styles';
import Link from 'next/link';
@@ -7,7 +7,7 @@ import Button from '../Button';
import IconButton from '../IconButton';
import MobileNav from '../MobileNav';
const Nav: FC = () => {
const Nav = () => {
const [mobileNavOpen, setMobileNavOpen] = useState<boolean>(false);
const { mode, toggle } = useContext(ThemeContext);
@@ -41,7 +41,7 @@ const Nav: FC = () => {
Resume
</Button>
<IconButton
alt='Theme toggler'
alt='Hamburger menu'
icon={mode === 'dark' ? '/icons/light-menu.svg' : '/icons/dark-menu.svg'}
onClick={() => setMobileNavOpen(true)}
/>