2019-10-16 14:14:02 +09:00
|
|
|
import React from 'react';
|
|
|
|
import {useTranslation} from 'react-i18next';
|
2020-02-05 16:22:35 +09:00
|
|
|
import {NetlifyIcon} from '../../Icons';
|
2019-10-16 14:14:02 +09:00
|
|
|
|
2020-02-05 16:22:35 +09:00
|
|
|
import {Card, Repeater, DedicatedAvailability} from '../core';
|
2019-10-16 14:14:02 +09:00
|
|
|
|
|
|
|
const NetlifyCard: React.FC<{query: string}> = ({query}) => {
|
|
|
|
const {t} = useTranslation();
|
|
|
|
const lowerCase = query.toLowerCase();
|
|
|
|
|
|
|
|
const names = [lowerCase];
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Card title={t('providers.netlify')}>
|
|
|
|
<Repeater items={names}>
|
|
|
|
{(name) => (
|
|
|
|
<DedicatedAvailability
|
|
|
|
name={`${name}.netlify.com`}
|
|
|
|
service="existence"
|
|
|
|
message={`Open ${name}.netlify.com`}
|
|
|
|
link={`https://${name}.netlify.com`}
|
|
|
|
icon={<NetlifyIcon />}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
</Repeater>
|
|
|
|
</Card>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default NetlifyCard;
|