diff --git a/public/locales/de/translation.json b/public/locales/de/translation.json index 2b1fe60..bf57686 100644 --- a/public/locales/de/translation.json +++ b/public/locales/de/translation.json @@ -25,6 +25,7 @@ "homebrew": "Homebrew", "instagram": "Instagram", "jsorg": "js.org", + "modland": "mod.land", "linux": "Linux", "netlify": "Netlify", "now": "Vercel", diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 71a56de..6c00855 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -28,6 +28,7 @@ "homebrew": "Homebrew", "instagram": "Instagram", "jsorg": "js.org", + "modland": "mod.land", "linux": "Linux", "netlify": "Netlify", "now": "Vercel", diff --git a/public/locales/es/translation.json b/public/locales/es/translation.json index cbdc4a1..4943e6b 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -28,6 +28,7 @@ "homebrew": "Homebrew", "instagram": "Instagram", "jsorg": "js.org", + "modland": "mod.land", "linux": "Linux", "netlify": "Netlify", "now": "Vercel", diff --git a/public/locales/fr/translation.json b/public/locales/fr/translation.json index 0de6625..d9552fb 100644 --- a/public/locales/fr/translation.json +++ b/public/locales/fr/translation.json @@ -25,6 +25,7 @@ "homebrew": "Homebrew", "instagram": "Instagram", "jsorg": "js.org", + "modland": "mod.land", "linux": "Linux", "netlify": "Netlify", "now": "Vercel", diff --git a/public/locales/it/translation.json b/public/locales/it/translation.json index 3739435..d99d7a6 100644 --- a/public/locales/it/translation.json +++ b/public/locales/it/translation.json @@ -28,6 +28,7 @@ "homebrew": "Homebrew", "instagram": "Instagram", "jsorg": "js.org", + "modland": "mod.land", "linux": "Linux", "netlify": "Netlify", "now": "Vercel", diff --git a/public/locales/ja/translation.json b/public/locales/ja/translation.json index 6eb5145..13f3e96 100644 --- a/public/locales/ja/translation.json +++ b/public/locales/ja/translation.json @@ -25,6 +25,7 @@ "homebrew": "Homebrew", "instagram": "Instagram", "jsorg": "js.org", + "modland": "mod.land", "linux": "Linux", "netlify": "Netlify", "now": "Vercel", diff --git a/public/locales/pt-BR/translation.json b/public/locales/pt-BR/translation.json index d73654d..ac6d8b5 100644 --- a/public/locales/pt-BR/translation.json +++ b/public/locales/pt-BR/translation.json @@ -28,6 +28,7 @@ "homebrew": "Homebrew", "instagram": "Instagram", "jsorg": "js.org", + "modland": "mod.land", "linux": "Linux", "netlify": "Netlify", "now": "Vercel", diff --git a/public/locales/zh-Hans/translation.json b/public/locales/zh-Hans/translation.json index 49528bf..fa5c8d1 100644 --- a/public/locales/zh-Hans/translation.json +++ b/public/locales/zh-Hans/translation.json @@ -25,6 +25,7 @@ "homebrew": "Homebrew", "instagram": "Instagram", "jsorg": "js.org", + "modland": "mod.land", "linux": "Linux", "netlify": "Netlify", "now": "Vercel", diff --git a/public/locales/zh-Hant/translation.json b/public/locales/zh-Hant/translation.json index 8a21dd5..e2c4c02 100644 --- a/public/locales/zh-Hant/translation.json +++ b/public/locales/zh-Hant/translation.json @@ -25,6 +25,7 @@ "homebrew": "Homebrew", "instagram": "Instagram", "jsorg": "js.org", + "modland": "mod.land", "linux": "Linux", "netlify": "Netlify", "now": "Vercel", diff --git a/src/components/Welcome.tsx b/src/components/Welcome.tsx index dab3c3c..23a81f8 100644 --- a/src/components/Welcome.tsx +++ b/src/components/Welcome.tsx @@ -19,6 +19,7 @@ import { import { IoIosBeer, IoMdAppstore } from 'react-icons/io'; import { MdDomain } from 'react-icons/md'; import { RiBuilding2Fill, RiChromeFill, RiNpmjsFill } from 'react-icons/ri'; +import { SiDeno } from 'react-icons/si'; import { SiAppstore, SiArchlinux, @@ -60,6 +61,7 @@ const supportedProviders: Record<string, React.ReactNode> = { s3: <FaAws />, firebase: <SiFirebase />, jsorg: <FaJsSquare />, + modland: <SiDeno />, githubSearch: <FaGithubAlt />, appStore: <SiAppstore />, playStore: <IoMdAppstore />, diff --git a/src/components/cards/index.tsx b/src/components/cards/index.tsx index 7029693..ad574d7 100644 --- a/src/components/cards/index.tsx +++ b/src/components/cards/index.tsx @@ -16,6 +16,7 @@ import HerokuCard from './providers/Heroku'; import HomebrewCard from './providers/Homebrew'; // import InstagramCard from './providers/Instagram'; import JsOrgCard from './providers/JsOrg'; +import ModLandCard from './providers/ModLand'; import LinuxCard from './providers/Linux'; import NetlifyCard from './providers/Netlify'; import NpmCard from './providers/Npm'; @@ -57,6 +58,7 @@ const Index: React.FC<{ query: string }> = ({ query }) => { <NetlifyCard query={query} /> <CloudflareCard query={query} /> <JsOrgCard query={query} /> + <ModLandCard query={query} /> <SlackCard query={query} /> {/* <InstagramCard query={query} /> */} {/* <SpectrumCard query={query} /> */} diff --git a/src/components/cards/providers/ModLand.tsx b/src/components/cards/providers/ModLand.tsx new file mode 100644 index 0000000..fe72bcd --- /dev/null +++ b/src/components/cards/providers/ModLand.tsx @@ -0,0 +1,36 @@ +import React from 'react'; +import { useTranslation } from 'react-i18next'; +import { SiDeno } from 'react-icons/si'; +import { normalize } from '../../../util/text'; + +import { Card, Repeater, DedicatedAvailability } from '../core'; + +const ModLandCard: 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.modland')}> + <Repeater items={names}> + {(name) => ( + <DedicatedAvailability + name={`${name}.mod.land`} + service="existence" + message="Go to mod.land repository" + link="https://github.com/denosaurs/mod.land" + messageIfTaken={`Go to ${name}.mod.land`} + linkIfTaken={`https://${name}.mod.land`} + icon={<SiDeno />} + /> + )} + </Repeater> + </Card> + ); +}; + +export default ModLandCard;