aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/MainNav/MainNav.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-22 12:36:40 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-22 14:32:31 +0100
commit139b3a252c9f90de603be1a98e3186b359353541 (patch)
treec020013b3aec522ae378b9e57ec1326a5a829d38 /src/components/MainNav/MainNav.tsx
parent6917a572011489aafe62c9d2479615cb2928094f (diff)
chore: replace svg imports with components
It allows me to control the colors of each SVG paths.
Diffstat (limited to 'src/components/MainNav/MainNav.tsx')
-rw-r--r--src/components/MainNav/MainNav.tsx16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/components/MainNav/MainNav.tsx b/src/components/MainNav/MainNav.tsx
index eb44e77..0f5147b 100644
--- a/src/components/MainNav/MainNav.tsx
+++ b/src/components/MainNav/MainNav.tsx
@@ -1,12 +1,14 @@
import { SetStateAction } from 'react';
import Link from 'next/link';
import { t } from '@lingui/macro';
-import { HamburgerIcon } from '@components/Icons';
+import {
+ BlogIcon,
+ ContactIcon,
+ CVIcon,
+ HamburgerIcon,
+ HomeIcon,
+} from '@components/Icons';
import { mainNav } from '@config/nav';
-import ArticlesIcon from '@assets/images/icon-articles.svg';
-import ContactIcon from '@assets/images/icon-contact.svg';
-import CVIcon from '@assets/images/icon-cv.svg';
-import HomeIcon from '@assets/images/icon-home.svg';
import styles from './MainNav.module.scss';
const MainNav = ({
@@ -21,7 +23,7 @@ const MainNav = ({
case 'home':
return <HomeIcon />;
case 'blog':
- return <ArticlesIcon />;
+ return <BlogIcon />;
case 'contact':
return <ContactIcon />;
case 'cv':
@@ -36,7 +38,7 @@ const MainNav = ({
<li key={item.id} className={styles.item}>
<Link href={item.slug}>
<a className={styles.link}>
- <span className={styles.icon}>{getIcon(item.id)}</span>
+ {getIcon(item.id)}
<span>{item.name}</span>
</a>
</Link>