Skip to content

Commit

Permalink
Changed Services section to Tech Stack section
Browse files Browse the repository at this point in the history
  • Loading branch information
devalentineomonya committed Mar 22, 2024
1 parent 266dd6d commit b48c894
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 15 deletions.
3 changes: 2 additions & 1 deletion src/Utils/ScrollUtils/ScrollUtils.jsx
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
5 changes: 4 additions & 1 deletion src/assets/ProjectsList/ProjectsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},

];
Expand Down
4 changes: 2 additions & 2 deletions src/components/CardItem/CardItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
};

Expand Down
Original file line number Diff line number Diff line change
@@ -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 = () => {
Expand All @@ -25,4 +25,4 @@ const Service = (props) => {
);
};

export default Service;
export default TechStack;
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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 (
<div className="services-section" >
<HeadLine id="services" number={"01"} description={"What i do as a service"} name={"Services"} />
<HeadLine id="services" number={"01"} description={"What i do as a service"} name={"Tech Stack"} />
<div className="services-container">
{servicesList.map((service, i) => (
<Service key={i} name={service.name} image={service.image} description={service.description} />
<TechStack key={i} name={service.name} image={service.image} description={service.description} />
))}
</div>
</div>
);
};

export default Services;
export default TechStacks;
File renamed without changes.
4 changes: 2 additions & 2 deletions src/pages/Home.jsx
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -26,7 +26,7 @@ const Home = ({ activeTab, setActiveTab }) => {
<Hero />

<ServicesContextProvider>
<Services />
<TechStacks />
</ServicesContextProvider>

<CounterContextProvider>
Expand Down

0 comments on commit b48c894

Please sign in to comment.