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

41 lines
1.1 KiB
TypeScript
Raw Normal View History

2020-08-31 08:41:53 +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
2020-08-31 08:41:53 +09:00
import { Card, Repeater, DedicatedAvailability } from '../core';
2019-08-05 22:59:47 +09:00
2020-08-20 00:57:33 +09:00
const LinuxCard: React.FC<{ query: string }> = ({ query }) => {
2020-08-31 08:41:53 +09:00
const { t } = useTranslation();
const lowerCase = query.toLowerCase();
2019-08-05 22:59:47 +09:00
2020-08-31 08:41:53 +09:00
const names = [lowerCase];
2019-08-06 00:45:18 +09:00
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"
2020-03-26 20:22:06 +09:00
message="Go to Launchpad"
2019-08-06 00:45:18 +09:00
link={`https://launchpad.net/ubuntu/+source/${name}`}
icon={<DiUbuntu />}
/>
<DedicatedAvailability
name={name}
service="debian"
2020-03-26 20:22:06 +09:00
message="Go to debian.org"
2019-08-06 00:45:18 +09:00
link={`https://packages.debian.org/buster/${name}`}
icon={<DiDebian />}
/>
</>
)}
</Repeater>
2019-08-05 22:59:47 +09:00
</Card>
2020-08-31 08:41:53 +09:00
);
};
2019-09-01 01:28:24 +09:00
2020-08-31 08:41:53 +09:00
export default LinuxCard;