Skip to content

Commit

Permalink
open projects in same window
Browse files Browse the repository at this point in the history
  • Loading branch information
saipraveenkondapalli committed Jan 28, 2024
1 parent 73abb27 commit 0b33b10
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/SideProject.tsx
Original file line number Diff line number Diff line change
@@ -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<ISideProjectCard> = ({ project }) => {
const allTechStacks = [...programmingLanguages, ...otherTechStacks];
const allTechStacks = [...programmingLanguages, ...otherTechStacks]

return (
<MotionBox whileHover={{ y: -5 }}>
Expand All @@ -25,7 +25,7 @@ export const SideProjectCard: React.FC<ISideProjectCard> = ({ project }) => {
overflow={"hidden"}
_hover={{ cursor: "pointer" }}
onClick={() => {
project.link && window.open(project.link)
project.link && (window.location.href = project.link)
}}
>
<Box bg={"gray.100"} mt={-6} mx={-6} pos={"relative"}>
Expand All @@ -35,7 +35,7 @@ export const SideProjectCard: React.FC<ISideProjectCard> = ({ project }) => {
maxH={"210px"}
h={"210px"}
w="full"
alt={project.alt} />
alt={project.alt} />
</Box>
<Stack mb={3}>
<Text
Expand All @@ -51,12 +51,12 @@ export const SideProjectCard: React.FC<ISideProjectCard> = ({ project }) => {
<Text color={"gray.500"}>{project?.summary}</Text>
</Stack>
{project.tech.map((tech, index) => {
const techStack = allTechStacks.find(stack => stack.name === tech);
const techStack = allTechStacks.find(stack => stack.name === tech)
return (
<Tag size="sm" padding="10px" key={index} mb={2} mx={1}>
{techStack ? <Circle size="30px">{techStack.icon}</Circle> : tech}
</Tag>
);
)
})}
</LinkBox>
</Center>
Expand Down

0 comments on commit 0b33b10

Please sign in to comment.