1
0
mirror of https://github.com/uetchy/namae.git synced 2025-07-02 14:20:03 +09:00
namae/web/src/components/cards/LinuxCard.js

39 lines
1.0 KiB
JavaScript
Raw Normal View History

2019-08-05 22:59:47 +09:00
import React from 'react'
import { useTranslation } from 'react-i18next'
import { DiUbuntu } from 'react-icons/di'
import { DiDebian } from 'react-icons/di'
2019-08-06 00:45:18 +09:00
import { Card, Repeater, DedicatedAvailability } from '../Cards'
2019-08-05 22:59:47 +09:00
export default function LinuxCard({ name }) {
const { t } = useTranslation()
const lowerCase = name.toLowerCase()
2019-08-06 00:45:18 +09:00
const names = [lowerCase]
2019-08-05 22:59:47 +09:00
return (
2019-08-06 00:45:18 +09:00
<Card title={t('providers.linux')}>
<Repeater items={names}>
{(name) => (
<>
<DedicatedAvailability
name={name}
service="launchpad"
link={`https://launchpad.net/ubuntu/+source/${name}`}
prefix="launchpad:"
icon={<DiUbuntu />}
/>
<DedicatedAvailability
name={name}
service="debian"
link={`https://packages.debian.org/buster/${name}`}
prefix="debian:"
icon={<DiDebian />}
/>
</>
)}
</Repeater>
2019-08-05 22:59:47 +09:00
</Card>
)
}