fix: update links in /about cards (#5593)

This commit is contained in:
Vignesh Mohankumar 2022-12-08 17:17:05 -05:00 committed by GitHub
parent e85b6e4cc6
commit 2e1d4fdda1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,7 @@
import { Link } from 'react-router-dom'
import styled from 'styled-components/macro'
const StyledCard = styled.a`
const StyledCard = styled.div`
display: flex;
background: linear-gradient(180deg, rgba(19, 22, 27, 0.54) 0%, #13161b 100%);
flex-direction: column;
@ -29,9 +30,25 @@ const CardDescription = styled.div`
line-height: 36px;
`
const Card = ({ title, description, to }: { title: string; description: string; to: string; external?: boolean }) => {
const Card = ({
title,
description,
to,
external,
}: {
title: string
description: string
to: string
external?: boolean
}) => {
return (
<StyledCard href={to}>
<StyledCard
as={external ? 'a' : Link}
to={external ? undefined : to}
href={external ? to : undefined}
target={external ? '_blank' : undefined}
rel={external ? 'noopenener noreferrer' : undefined}
>
<CardTitle>{title}</CardTitle>
<CardDescription>{description}</CardDescription>
</StyledCard>