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

31 lines
731 B
TypeScript
Raw Normal View History

2019-07-31 13:11:00 +09:00
import React from 'react'
2019-08-03 13:36:29 +09:00
import { useTranslation } from 'react-i18next'
2019-08-27 03:15:35 +09:00
import { NowIcon } from '../Icons'
2019-08-06 00:45:18 +09:00
import { Card, Repeater, DedicatedAvailability } from './core'
2019-07-31 13:11:00 +09:00
2019-09-01 01:28:24 +09:00
const NowCard: React.FC<{ query: string }> = ({ query }) => {
2019-08-03 13:36:29 +09:00
const { t } = useTranslation()
2019-08-06 02:07:05 +09:00
const lowerCase = query.toLowerCase()
2019-07-31 13:11:00 +09:00
2019-08-06 00:45:18 +09:00
const names = [lowerCase]
2019-07-31 13:11:00 +09:00
return (
2019-08-27 03:15:35 +09:00
<Card title={t('providers.now')}>
2019-08-06 00:45:18 +09:00
<Repeater items={names}>
{(name) => (
<DedicatedAvailability
2019-08-27 03:15:35 +09:00
name={`${name}.now.sh`}
service="existence"
message="Go to Now"
link={`https://${name}.now.sh`}
icon={<NowIcon />}
2019-08-06 00:45:18 +09:00
/>
)}
</Repeater>
2019-07-31 13:11:00 +09:00
</Card>
)
}
2019-09-01 01:28:24 +09:00
export default NowCard