Update project structure

This commit is contained in:
Hazem Krimi
2022-01-08 19:06:43 +01:00
parent 574f0b4d63
commit 79279e4706
20 changed files with 78 additions and 104 deletions
+3 -3
View File
@@ -1,10 +1,10 @@
import { FC, useContext } from 'react';
import { DarkModeContext } from '../../components/DarkMode';
import { ThemeContext } from '../../styles/theme';
import { Wrapper } from './styles';
import Image from 'next/image';
const Hero: FC = () => {
const { dark } = useContext(DarkModeContext);
const { mode } = useContext(ThemeContext);
return (
<Wrapper>
@@ -16,7 +16,7 @@ const Hero: FC = () => {
</div>
<div className='illustration'>
<Image
src={dark ? '/dark-illustration.svg' : '/light-illustration.svg'}
src={mode === 'dark' ? '/dark-illustration.svg' : '/light-illustration.svg'}
width='100%'
height='100%'
layout='responsive'