diff --git a/package.json b/package.json index 6af5454..fedf83c 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,14 @@ { "name": "john.tech", "version": "1.0.0", - "description": "", + "description": "Personal website", "main": "index.js", "scripts": { - "start": "webpack serve", "dev": "vite", "build": "vite build", "preview": "vite preview" }, - "keywords": [], "author": "John Costa", - "license": "ISC", "devDependencies": { "@vitejs/plugin-react": "^1.3.0", "autoprefixer": "^10.4.4", diff --git a/src/components/pages/Front.page.jsx b/src/components/pages/Front.page.jsx index ae7cac4..ef50234 100644 --- a/src/components/pages/Front.page.jsx +++ b/src/components/pages/Front.page.jsx @@ -18,7 +18,7 @@ import Experience from "../sections/Experience"; // Component //============================================================ -const DELAY = 1000; +const DELAY = 0; const FrontPage = () => { return ( diff --git a/src/components/sections/Experience.jsx b/src/components/sections/Experience.jsx index 754e845..1912bff 100644 --- a/src/components/sections/Experience.jsx +++ b/src/components/sections/Experience.jsx @@ -1,11 +1,20 @@ import React, { useState, useEffect } from "react"; +import clsx from "clsx"; -const experienceTitle = ["Real Tutor", "Tensorcrypt", "SSC Website"] +const experienceTitle = ["Real Tutor", "Tensorcrypt", "SSC Website"]; const experience = ["Hello", "World", "!"]; const Experience = () => { const [currentSection, setCurrentSection] = useState(0); - useEffect(() => console.log(currentSection), [currentSection]); + const [animationClasses, setAnimationClasses] = useState("opacity-100"); + + const changeText = (index) => { + setAnimationClasses("opacity-0"); + setTimeout(() => { + setAnimationClasses("opacity-100"); + setCurrentSection(index); + }, 250); + }; return (
@@ -22,48 +31,48 @@ const Experience = () => {
setCurrentSection(0)} + onClick={() => changeText(0)} >
setCurrentSection(1)} + onClick={() => changeText(1)} >
setCurrentSection(2)} + onClick={() => changeText(2)} >
-
setCurrentSection(0)} - > +

14/04/2022

-
setCurrentSection(1)} - > +

14/04/2022

-
setCurrentSection(2)} - > +

14/04/2022

-
-

{experienceTitle[currentSection]}

-

- {experience[currentSection]} -

+
+
+

+ {experienceTitle[currentSection]} +

+

+ {experience[currentSection]} +

+