1
0
mirror of https://github.com/uetchy/namae.git synced 2025-08-21 10:18:12 +09:00

chore: move components into separated files

This commit is contained in:
2019-09-02 19:41:44 +09:00
parent 7c18e0643c
commit 2438518e3c
22 changed files with 211 additions and 180 deletions

View File

@@ -0,0 +1,32 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import { FaJsSquare } from 'react-icons/fa'
import { Card, Repeater, DedicatedAvailability } from './core'
const JsOrgCard: React.FC<{ query: string }> = ({ query }) => {
const { t } = useTranslation()
const lowerCase = query.toLowerCase()
const names = [lowerCase]
return (
<Card title={t('providers.jsorg')}>
<Repeater items={names}>
{(name) => (
<DedicatedAvailability
name={`${name}.js.org`}
service="dns"
message="Go to js.org repository"
link="https://github.com/js-org/js.org"
messageIfTaken={`Go to ${name}.js.org`}
linkIfTaken={`https://${name}.js.org`}
icon={<FaJsSquare />}
/>
)}
</Repeater>
</Card>
)
}
export default JsOrgCard