mirror of
https://github.com/uetchy/namae.git
synced 2025-08-20 18:08:11 +09:00
dev: initial attempt
This commit is contained in:
33
components/cards/providers/FlyIo.tsx
Normal file
33
components/cards/providers/FlyIo.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { FaFly } from 'react-icons/fa';
|
||||
import { normalize } from '../../../util/text';
|
||||
import { Card, DedicatedAvailability, Repeater } from '../core';
|
||||
|
||||
const FlyIoCard: React.FC<{ query: string }> = ({ query }) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const normalizedQuery = normalize(query, {
|
||||
allowUnderscore: false,
|
||||
});
|
||||
const lowerCase = normalizedQuery.toLowerCase();
|
||||
const names = [lowerCase];
|
||||
|
||||
return (
|
||||
<Card title={t('providers.fly')}>
|
||||
<Repeater items={names}>
|
||||
{(name) => (
|
||||
<DedicatedAvailability
|
||||
name={`${name}.fly.dev`}
|
||||
service="dns"
|
||||
message={`Go to ${name}.fly.dev`}
|
||||
link={`https://${name}.fly.dev`}
|
||||
icon={<FaFly />}
|
||||
/>
|
||||
)}
|
||||
</Repeater>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default FlyIoCard;
|
Reference in New Issue
Block a user