Commit 2e1d4fdd authored by Vignesh Mohankumar's avatar Vignesh Mohankumar Committed by GitHub

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

parent e85b6e4c
import { Link } from 'react-router-dom'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
const StyledCard = styled.a` const StyledCard = styled.div`
display: flex; display: flex;
background: linear-gradient(180deg, rgba(19, 22, 27, 0.54) 0%, #13161b 100%); background: linear-gradient(180deg, rgba(19, 22, 27, 0.54) 0%, #13161b 100%);
flex-direction: column; flex-direction: column;
...@@ -29,9 +30,25 @@ const CardDescription = styled.div` ...@@ -29,9 +30,25 @@ const CardDescription = styled.div`
line-height: 36px; 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 ( 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> <CardTitle>{title}</CardTitle>
<CardDescription>{description}</CardDescription> <CardDescription>{description}</CardDescription>
</StyledCard> </StyledCard>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment