Get in Touch
diff --git a/src/pages/Home.jsx b/src/pages/Home.jsx index b771157..9b51252 100644 --- a/src/pages/Home.jsx +++ b/src/pages/Home.jsx @@ -1,4 +1,4 @@ -import { useState, Suspense } from 'react' +import { useState, Suspense, useEffect, useRef } from 'react' import { Canvas } from '@react-three/fiber' import Loader from '../components/Loader' import Island from '../models/Island' @@ -7,13 +7,30 @@ import Dragon from '../models/Dragon' import Plane from '../models/Plane' import HomeInfo from '../components/HomeInfo' +import forest from '../assets/forest.mp3' +import { soundon, soundoff } from '../assets/icons' + const Home = () => { + const audioRef = useRef(new Audio(forest)) + audioRef.current.volume = 0.4 + audioRef.current.loop = true const [isRotating, setIsRotating] = useState() {/* The current stage of the popups, used to determine the stage of the popups */} const [currentStage, setCurrentStage] = useState(1) + const [isPlayingMusic, setIsPlayingMusic] = useState(false) + useEffect(() => { + if (isPlayingMusic) { + audioRef.current.play() + } + + return () => { + audioRef.current.pause() + } + }, [isPlayingMusic]) + {/* Adapt the app to different kind of devices adjusting scale, rotation and position of the island */} const adjustIslandForScreenSize = () => { @@ -86,6 +103,14 @@ const Home = () => { /> +
+ setIsPlayingMusic(!isPlayingMusic)}
+ />
+
)
}
diff --git a/src/pages/Projects.jsx b/src/pages/Projects.jsx
index 9abd0eb..8104b30 100644
--- a/src/pages/Projects.jsx
+++ b/src/pages/Projects.jsx
@@ -1,8 +1,63 @@
-import React from 'react'
+import { Link } from 'react-router-dom'
+import { projects } from '../constants'
+import { arrow } from '../assets/icons'
+import CTA from '../components/CTA'
const Projects = () => {
return (
- Projects
+ + My Projects +
+ +
+
+ I've embarked on numerous projects throughout the years, but these are the ones + I'm most proud of. I've learned a lot from each of them and + I'm excited to share them with you.
+
+ {projects.map((project) => (
+
+
+
+ ))}
+
+
+
+
+
+
+
+
+ + {project.name} +
++ {project.description} +
+
+
+ Live Link
+
+
+
+ +