1
0
mirror of https://github.com/uetchy/namae.git synced 2025-03-18 13:00:33 +09:00
namae/web/src/components/cards/GithubCard.js
2019-08-03 13:36:29 +09:00

35 lines
863 B
JavaScript

import React from 'react'
import { useTranslation } from 'react-i18next'
import { FaGithub } from 'react-icons/fa'
import { Card } from '../Cards'
import { DedicatedAvailability } from '../Availability'
import { capitalize } from '../../util/text'
export default function GithubCard({ name }) {
const { t } = useTranslation()
const lowerCase = name.toLowerCase()
return (
<Card
title={t('providers.github')}
key={name}
nameList={[name]}
alternativeList={[
`${lowerCase}hq`,
`${lowerCase}-team`,
`${lowerCase}-org`,
`${capitalize(name)}-js`,
]}>
{(name) => (
<DedicatedAvailability
name={name}
service="github"
link={`https://github.com/${name}`}
prefix="github.com/"
icon={<FaGithub />}
/>
)}
</Card>
)
}