mirror of
https://github.com/uetchy/namae.git
synced 2025-08-20 18:08:11 +09:00
feat: add linux card
This commit is contained in:
34
web/src/components/cards/LinuxCard.js
Normal file
34
web/src/components/cards/LinuxCard.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { DiUbuntu } from 'react-icons/di'
|
||||
import { DiDebian } from 'react-icons/di'
|
||||
import { Card } from '../Cards'
|
||||
import { DedicatedAvailability } from '../Cards'
|
||||
|
||||
export default function LinuxCard({ name }) {
|
||||
const { t } = useTranslation()
|
||||
const lowerCase = name.toLowerCase()
|
||||
|
||||
return (
|
||||
<Card title={t('providers.linux')} nameList={[lowerCase]}>
|
||||
{(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 />}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</Card>
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user