mirror of
https://github.com/uetchy/namae.git
synced 2025-07-07 00:16:00 +09:00
31 lines
772 B
TypeScript
31 lines
772 B
TypeScript
|
import React from 'react';
|
||
|
import {useTranslation} from 'react-i18next';
|
||
|
import {OcamlIcon} from '../../Icons';
|
||
|
|
||
|
import {Card, Repeater, DedicatedAvailability} from '../core';
|
||
|
|
||
|
const OcamlCard: React.FC<{query: string}> = ({query}) => {
|
||
|
const {t} = useTranslation();
|
||
|
const lowerCase = query.toLowerCase();
|
||
|
|
||
|
const names = [lowerCase];
|
||
|
|
||
|
return (
|
||
|
<Card title={t('providers.ocaml')}>
|
||
|
<Repeater items={names}>
|
||
|
{(name) => (
|
||
|
<DedicatedAvailability
|
||
|
name={name}
|
||
|
query={`opam.ocaml.org/packages/${name}/`}
|
||
|
service="existence"
|
||
|
link={`https://opam.ocaml.org/packages/${name}/`}
|
||
|
icon={<OcamlIcon />}
|
||
|
/>
|
||
|
)}
|
||
|
</Repeater>
|
||
|
</Card>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default OcamlCard;
|