From 0b33b107daa70fbd97d8a85d011e08fba5cd0de0 Mon Sep 17 00:00:00 2001 From: Sai Praveen Kondapalli <63105626+saipraveenkondapalli@users.noreply.github.com> Date: Sun, 28 Jan 2024 11:08:24 +0530 Subject: [PATCH] open projects in same window --- src/components/SideProject.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/SideProject.tsx b/src/components/SideProject.tsx index 4963c0d..14afe62 100644 --- a/src/components/SideProject.tsx +++ b/src/components/SideProject.tsx @@ -1,15 +1,15 @@ import * as React from "react" -import { Box, Center, Image, LinkBox, Stack, Tag, Text, useColorModeValue, Circle } from "@chakra-ui/react" +import { Box, Center, Circle, Image, LinkBox, Stack, Tag, Text, useColorModeValue } from "@chakra-ui/react" import { MotionBox } from "../utils/motion" import { Project } from "../types/project" -import { programmingLanguages, otherTechStacks } from "../constant" +import { otherTechStacks, programmingLanguages } from "../constant" interface ISideProjectCard { project: Project; } export const SideProjectCard: React.FC = ({ project }) => { - const allTechStacks = [...programmingLanguages, ...otherTechStacks]; + const allTechStacks = [...programmingLanguages, ...otherTechStacks] return ( @@ -25,7 +25,7 @@ export const SideProjectCard: React.FC = ({ project }) => { overflow={"hidden"} _hover={{ cursor: "pointer" }} onClick={() => { - project.link && window.open(project.link) + project.link && (window.location.href = project.link) }} > @@ -35,7 +35,7 @@ export const SideProjectCard: React.FC = ({ project }) => { maxH={"210px"} h={"210px"} w="full" - alt={project.alt} /> + alt={project.alt} /> = ({ project }) => { {project?.summary} {project.tech.map((tech, index) => { - const techStack = allTechStacks.find(stack => stack.name === tech); + const techStack = allTechStacks.find(stack => stack.name === tech) return ( {techStack ? {techStack.icon} : tech} - ); + ) })}