mirror of
https://github.com/uetchy/namae.git
synced 2025-08-20 09:58:13 +09:00
feat: add firebase
This commit is contained in:
@@ -25,7 +25,8 @@
|
||||
"now": "Vercel",
|
||||
"netlify": "Netlify",
|
||||
"nta": "Company (JP)",
|
||||
"ocaml": "OCaml"
|
||||
"ocaml": "OCaml",
|
||||
"firebase": "Firebase"
|
||||
},
|
||||
"uniqueness": {
|
||||
"high": "Pretty unique",
|
||||
|
@@ -25,7 +25,8 @@
|
||||
"now": "Vercel",
|
||||
"netlify": "Netlify",
|
||||
"nta": "法人",
|
||||
"ocaml": "OCaml"
|
||||
"ocaml": "OCaml",
|
||||
"firebase": "Firebase"
|
||||
},
|
||||
"uniqueness": {
|
||||
"high": "とてもユニーク",
|
||||
|
@@ -20,7 +20,7 @@ import {
|
||||
FaBuilding,
|
||||
} from 'react-icons/fa';
|
||||
import {IoIosBeer} from 'react-icons/io';
|
||||
import {DiRust, DiHeroku} from 'react-icons/di';
|
||||
import {DiRust, DiHeroku, DiFirebase} from 'react-icons/di';
|
||||
|
||||
import {SpectrumIcon, NowIcon, NetlifyIcon, OcamlIcon} from './Icons';
|
||||
import {mobile} from '../util/css';
|
||||
@@ -99,6 +99,9 @@ const Welcome: React.FC = () => {
|
||||
<ListItem>
|
||||
<FaAws /> {t('providers.s3')}
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<DiFirebase /> {t('providers.firebase')}
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<FaJsSquare /> {t('providers.jsorg')}
|
||||
</ListItem>
|
||||
|
@@ -25,6 +25,7 @@ import VercelCard from './providers/Vercel';
|
||||
import NtaCard from './providers/Nta';
|
||||
import NetlifyCard from './providers/Netlify';
|
||||
import OcamlCard from './providers/Ocaml';
|
||||
import FirebaseCard from './providers/Firebase';
|
||||
|
||||
const Index: React.FC<{query: string}> = ({query}) => {
|
||||
const {
|
||||
@@ -53,6 +54,7 @@ const Index: React.FC<{query: string}> = ({query}) => {
|
||||
<InstagramCard query={query} />
|
||||
<SpectrumCard query={query} />
|
||||
<S3Card query={query} />
|
||||
<FirebaseCard query={query} />
|
||||
</Cards>
|
||||
<Cards>
|
||||
<GithubSearchCard query={query} />
|
||||
|
35
web/src/components/cards/providers/Firebase.tsx
Normal file
35
web/src/components/cards/providers/Firebase.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import React from 'react';
|
||||
import {useTranslation} from 'react-i18next';
|
||||
import {DiFirebase} from 'react-icons/di';
|
||||
|
||||
import {Card, Repeater, DedicatedAvailability} from '../core';
|
||||
|
||||
const FirebaseCard: React.FC<{query: string}> = ({query}) => {
|
||||
const {t} = useTranslation();
|
||||
|
||||
const sanitizedQuery = query
|
||||
.replace(/[^0-9a-zA-Z_-]/g, '')
|
||||
.replace(/_/g, '-');
|
||||
const lowerCase = sanitizedQuery.toLowerCase();
|
||||
|
||||
const names = [lowerCase];
|
||||
|
||||
return (
|
||||
<Card title={t('providers.firebase')}>
|
||||
<Repeater items={names}>
|
||||
{(name) => (
|
||||
<DedicatedAvailability
|
||||
name={name}
|
||||
query={`${name}.firebaseio.com`}
|
||||
service="existence"
|
||||
message="Go to Firebase"
|
||||
link={`https://${name}.firebaseio.com/`}
|
||||
icon={<DiFirebase />}
|
||||
/>
|
||||
)}
|
||||
</Repeater>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default FirebaseCard;
|
@@ -5,7 +5,7 @@ import XHR from 'i18next-xhr-backend';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
import {initReactI18next} from 'react-i18next';
|
||||
|
||||
const TRANSLATION_VERSION = '1.15';
|
||||
const TRANSLATION_VERSION = '1.16';
|
||||
|
||||
i18n
|
||||
.use(Backend)
|
||||
|
Reference in New Issue
Block a user