mirror of
https://github.com/uetchy/namae.git
synced 2025-03-16 20:20:38 +09:00
Merge pull request #153 from BlackdestinyXX/master
feat: support for mod.land
This commit is contained in:
commit
5cd4082d29
@ -25,6 +25,7 @@
|
||||
"homebrew": "Homebrew",
|
||||
"instagram": "Instagram",
|
||||
"jsorg": "js.org",
|
||||
"modland": "mod.land",
|
||||
"linux": "Linux",
|
||||
"netlify": "Netlify",
|
||||
"now": "Vercel",
|
||||
|
@ -28,6 +28,7 @@
|
||||
"homebrew": "Homebrew",
|
||||
"instagram": "Instagram",
|
||||
"jsorg": "js.org",
|
||||
"modland": "mod.land",
|
||||
"linux": "Linux",
|
||||
"netlify": "Netlify",
|
||||
"now": "Vercel",
|
||||
|
@ -28,6 +28,7 @@
|
||||
"homebrew": "Homebrew",
|
||||
"instagram": "Instagram",
|
||||
"jsorg": "js.org",
|
||||
"modland": "mod.land",
|
||||
"linux": "Linux",
|
||||
"netlify": "Netlify",
|
||||
"now": "Vercel",
|
||||
|
@ -25,6 +25,7 @@
|
||||
"homebrew": "Homebrew",
|
||||
"instagram": "Instagram",
|
||||
"jsorg": "js.org",
|
||||
"modland": "mod.land",
|
||||
"linux": "Linux",
|
||||
"netlify": "Netlify",
|
||||
"now": "Vercel",
|
||||
|
@ -28,6 +28,7 @@
|
||||
"homebrew": "Homebrew",
|
||||
"instagram": "Instagram",
|
||||
"jsorg": "js.org",
|
||||
"modland": "mod.land",
|
||||
"linux": "Linux",
|
||||
"netlify": "Netlify",
|
||||
"now": "Vercel",
|
||||
|
@ -25,6 +25,7 @@
|
||||
"homebrew": "Homebrew",
|
||||
"instagram": "Instagram",
|
||||
"jsorg": "js.org",
|
||||
"modland": "mod.land",
|
||||
"linux": "Linux",
|
||||
"netlify": "Netlify",
|
||||
"now": "Vercel",
|
||||
|
@ -28,6 +28,7 @@
|
||||
"homebrew": "Homebrew",
|
||||
"instagram": "Instagram",
|
||||
"jsorg": "js.org",
|
||||
"modland": "mod.land",
|
||||
"linux": "Linux",
|
||||
"netlify": "Netlify",
|
||||
"now": "Vercel",
|
||||
|
@ -25,6 +25,7 @@
|
||||
"homebrew": "Homebrew",
|
||||
"instagram": "Instagram",
|
||||
"jsorg": "js.org",
|
||||
"modland": "mod.land",
|
||||
"linux": "Linux",
|
||||
"netlify": "Netlify",
|
||||
"now": "Vercel",
|
||||
|
@ -25,6 +25,7 @@
|
||||
"homebrew": "Homebrew",
|
||||
"instagram": "Instagram",
|
||||
"jsorg": "js.org",
|
||||
"modland": "mod.land",
|
||||
"linux": "Linux",
|
||||
"netlify": "Netlify",
|
||||
"now": "Vercel",
|
||||
|
@ -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 />,
|
||||
|
@ -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} /> */}
|
||||
|
36
src/components/cards/providers/ModLand.tsx
Normal file
36
src/components/cards/providers/ModLand.tsx
Normal file
@ -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;
|
Loading…
x
Reference in New Issue
Block a user