diff --git a/src/Utils/ScrollUtils/ScrollUtils.jsx b/src/Utils/ScrollUtils/ScrollUtils.jsx index de72ce4..8c953e6 100644 --- a/src/Utils/ScrollUtils/ScrollUtils.jsx +++ b/src/Utils/ScrollUtils/ScrollUtils.jsx @@ -1,7 +1,8 @@ // scrollUtils.js export const scrollToSection = (sectionId) => { const section = document.getElementById(sectionId); - if (sectionId !== "home") { + + if (sectionId !== "home" && sectionId !== "") { if (section) { window.scrollTo({ top: section.offsetTop - 100, diff --git a/src/assets/ProjectsList/ProjectsList.jsx b/src/assets/ProjectsList/ProjectsList.jsx index dfcbc6e..864c969 100644 --- a/src/assets/ProjectsList/ProjectsList.jsx +++ b/src/assets/ProjectsList/ProjectsList.jsx @@ -4,19 +4,22 @@ let ProjectsList = [ name: "Project Name", image: image1, technology: "ReactJs", - link: "http://reactjs.com", + live_link: "http://reactjs.com", + github_link:"https://github.com/devalentineomonya" }, { name: "Project Name", image: image1, technology: "ReactJs", link: "http://reactjs.com", + github_link:"https://github.com/devalentineomonya" }, { name: "Project Name", image: image1, technology: "ReactJs", link: "http://reactjs.com", + github_link:"https://github.com/devalentineomonya", }, ]; diff --git a/src/components/CardItem/CardItem.jsx b/src/components/CardItem/CardItem.jsx index f35e645..10dc59d 100644 --- a/src/components/CardItem/CardItem.jsx +++ b/src/components/CardItem/CardItem.jsx @@ -3,8 +3,8 @@ import "./carditem.css"; const CardItem = ({ cardContent }) => { const handleClick = () => { - if (cardContent.link) { - window.open(cardContent.link, "_blank"); // Open link in a new tab + if (cardContent.live_link) { + window.open(cardContent.live_link, "_blank"); } }; diff --git a/src/components/Service/Service.jsx b/src/components/TechStack/TechStack.jsx similarity index 89% rename from src/components/Service/Service.jsx rename to src/components/TechStack/TechStack.jsx index 4cc46b5..ca748a8 100644 --- a/src/components/Service/Service.jsx +++ b/src/components/TechStack/TechStack.jsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import chevron_right from "../../assets/images/chevron.png"; -import "./service.css"; -const Service = (props) => { +import "./techstack.css"; +const TechStack = (props) => { const [isActive, setIsActive] = useState(false); const toggleAccordion = () => { @@ -25,4 +25,4 @@ const Service = (props) => { ); }; -export default Service; +export default TechStack; diff --git a/src/components/Service/service.css b/src/components/TechStack/techstack.css similarity index 100% rename from src/components/Service/service.css rename to src/components/TechStack/techstack.css diff --git a/src/components/Servces/Services.jsx b/src/components/TechStacks/TechStacks.jsx similarity index 62% rename from src/components/Servces/Services.jsx rename to src/components/TechStacks/TechStacks.jsx index 8595391..607a5ac 100644 --- a/src/components/Servces/Services.jsx +++ b/src/components/TechStacks/TechStacks.jsx @@ -1,21 +1,21 @@ import React, { useContext } from "react"; -import "./services.css"; -import Service from "../Service/Service"; +import "./techstacks.css"; +import TechStack from "../TechStack/TechStack"; import { ServicesContext } from "../../Context/ServicesContext"; import HeadLine from "../HeadLine/HeadLine"; -const Services = () => { +const TechStacks = () => { const { servicesList } = useContext(ServicesContext); return (
- +
{servicesList.map((service, i) => ( - + ))}
); }; -export default Services; +export default TechStacks; diff --git a/src/components/Servces/services.css b/src/components/TechStacks/techstacks.css similarity index 100% rename from src/components/Servces/services.css rename to src/components/TechStacks/techstacks.css diff --git a/src/pages/Home.jsx b/src/pages/Home.jsx index 3ba80db..45a6607 100644 --- a/src/pages/Home.jsx +++ b/src/pages/Home.jsx @@ -1,5 +1,5 @@ import Hero from "../components/Hero/Hero"; -import Services from "../components/Servces/Services"; +import TechStacks from "../components/TechStacks/TechStacks"; import ServicesContextProvider from "../Context/ServicesContext"; import About from "../components/About/About"; import CounterContextProvider from "../Context/CounterContext"; @@ -26,7 +26,7 @@ const Home = ({ activeTab, setActiveTab }) => { - +