mirror of
https://github.com/uetchy/namae.git
synced 2025-03-17 04:30:31 +09:00
chore: fulfill ExternalLink
This commit is contained in:
parent
afd9452e0d
commit
92529201e8
@ -5,6 +5,9 @@
|
||||
"scripts": {
|
||||
"start": "now dev"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": "^12.6.8"
|
||||
},
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
|
@ -3,6 +3,8 @@ import styled from 'styled-components'
|
||||
import useFetch from 'fetch-suspense'
|
||||
import { BarLoader } from 'react-spinners'
|
||||
|
||||
import { ExternalLink } from './Links'
|
||||
|
||||
function AvailabilityCell({
|
||||
name,
|
||||
availability,
|
||||
@ -15,7 +17,7 @@ function AvailabilityCell({
|
||||
<ItemContainer>
|
||||
{icon}
|
||||
<Item>
|
||||
<a href={link} target="_blank" rel="noopener noreferrer">
|
||||
<ExternalLink href={link}>
|
||||
{prefix}
|
||||
{availability ? (
|
||||
<span style={{ color: 'green' }}>{name}</span>
|
||||
@ -23,7 +25,7 @@ function AvailabilityCell({
|
||||
<span style={{ color: 'red' }}>{name}</span>
|
||||
)}
|
||||
{suffix}
|
||||
</a>
|
||||
</ExternalLink>
|
||||
</Item>
|
||||
</ItemContainer>
|
||||
)
|
||||
|
@ -2,6 +2,8 @@ import React from 'react'
|
||||
import styled from 'styled-components'
|
||||
import { FaTwitter, FaGithubAlt } from 'react-icons/fa'
|
||||
|
||||
import { ExternalLink } from './Links'
|
||||
|
||||
export default function Footer() {
|
||||
return (
|
||||
<Container>
|
||||
@ -12,18 +14,12 @@ export default function Footer() {
|
||||
</span>
|
||||
<br />
|
||||
<br />
|
||||
<a
|
||||
href="https://twitter.com/uetschy"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
<ExternalLink href="https://twitter.com/uetschy">
|
||||
<FaTwitter />
|
||||
</a>{' '}
|
||||
<a
|
||||
href="https://github.com/uetchy/namae"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
</ExternalLink>{' '}
|
||||
<ExternalLink href="https://github.com/uetchy/namae">
|
||||
<FaGithubAlt />
|
||||
</a>
|
||||
</ExternalLink>
|
||||
</p>
|
||||
</Container>
|
||||
)
|
||||
|
6
web/src/components/Links.js
Normal file
6
web/src/components/Links.js
Normal file
@ -0,0 +1,6 @@
|
||||
import styled from 'styled-components'
|
||||
|
||||
export const ExternalLink = styled.a.attrs({
|
||||
target: '_blank',
|
||||
rel: 'noopener noreferrer',
|
||||
})``
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { DiRust } from 'react-icons/di'
|
||||
import { Card } from '../Card'
|
||||
import { Card } from '../Cards'
|
||||
import { DedicatedAvailability } from '../Availability'
|
||||
|
||||
export default function CratesioCard({ name }) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { FaMapSigns } from 'react-icons/fa'
|
||||
import { Card } from '../Card'
|
||||
import { Card } from '../Cards'
|
||||
import { DedicatedAvailability } from '../Availability'
|
||||
|
||||
export default function DomainCard({ name }) {
|
||||
@ -13,8 +13,8 @@ export default function DomainCard({ name }) {
|
||||
nameList={[`${lowerCase}.app`, `${lowerCase}.dev`, `${lowerCase}.org`]}
|
||||
alternativeList={[
|
||||
`${lowerCase}app.com`,
|
||||
`get${lowerCase}.com`,
|
||||
`${lowerCase}.build`,
|
||||
`${lowerCase}.ai`,
|
||||
]}>
|
||||
{(name) => (
|
||||
<DedicatedAvailability
|
||||
|
@ -1,20 +1,22 @@
|
||||
import React from 'react'
|
||||
import { FaGithub } from 'react-icons/fa'
|
||||
import { Card } from '../Card'
|
||||
import { Card } from '../Cards'
|
||||
import { DedicatedAvailability } from '../Availability'
|
||||
import { capitalize } from '../../util/text'
|
||||
|
||||
export default function GithubCard({ name }) {
|
||||
const lowerCase = name.toLowerCase()
|
||||
|
||||
return (
|
||||
<Card
|
||||
title="GitHub Organization"
|
||||
key={name}
|
||||
nameList={[name]}
|
||||
alternativeList={[
|
||||
`${name.toLowerCase()}hq`,
|
||||
`${name.toLowerCase()}-team`,
|
||||
`${lowerCase}hq`,
|
||||
`${lowerCase}-team`,
|
||||
`${capitalize(name)}Team`,
|
||||
`${name.toLowerCase()}-org`,
|
||||
`${lowerCase}-org`,
|
||||
]}>
|
||||
{(name) => (
|
||||
<DedicatedAvailability
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { IoIosBeer } from 'react-icons/io'
|
||||
import { Card } from '../Card'
|
||||
import { Card } from '../Cards'
|
||||
import { ExistentialAvailability } from '../Availability'
|
||||
|
||||
export default function HomebrewCard({ name }) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { FaJsSquare } from 'react-icons/fa'
|
||||
import { Card } from '../Card'
|
||||
import { Card } from '../Cards'
|
||||
import { DedicatedAvailability } from '../Availability'
|
||||
|
||||
export default function JsOrgCard({ name }) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { FaNpm } from 'react-icons/fa'
|
||||
import { Card } from '../Card'
|
||||
import { Card } from '../Cards'
|
||||
import { DedicatedAvailability } from '../Availability'
|
||||
|
||||
export default function NpmCard({ name }) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { FaPython } from 'react-icons/fa'
|
||||
import { Card } from '../Card'
|
||||
import { Card } from '../Cards'
|
||||
import { DedicatedAvailability } from '../Availability'
|
||||
|
||||
export default function PypiCard({ name }) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { FaAws } from 'react-icons/fa'
|
||||
import { Card } from '../Card'
|
||||
import { Card } from '../Cards'
|
||||
import { DedicatedAvailability } from '../Availability'
|
||||
|
||||
export default function S3Card({ name }) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { FaSlack } from 'react-icons/fa'
|
||||
import { Card } from '../Card'
|
||||
import { Card } from '../Cards'
|
||||
import { DedicatedAvailability } from '../Availability'
|
||||
|
||||
export default function SlackCard({ name }) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { FaTwitter } from 'react-icons/fa'
|
||||
import { Card } from '../Card'
|
||||
import { Card } from '../Cards'
|
||||
import { DedicatedAvailability } from '../Availability'
|
||||
import { capitalize } from '../../util/text'
|
||||
|
||||
|
17
yarn.lock
17
yarn.lock
@ -1387,6 +1387,11 @@
|
||||
"@types/istanbul-lib-coverage" "*"
|
||||
"@types/istanbul-lib-report" "*"
|
||||
|
||||
"@types/node@^12.6.8":
|
||||
version "12.6.8"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.8.tgz#e469b4bf9d1c9832aee4907ba8a051494357c12c"
|
||||
integrity sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg==
|
||||
|
||||
"@types/q@^1.5.1":
|
||||
version "1.5.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8"
|
||||
@ -9225,9 +9230,9 @@ source-map-resolve@^0.5.0:
|
||||
urix "^0.1.0"
|
||||
|
||||
source-map-support@^0.5.6, source-map-support@~0.5.10, source-map-support@~0.5.12:
|
||||
version "0.5.12"
|
||||
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599"
|
||||
integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==
|
||||
version "0.5.13"
|
||||
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"
|
||||
integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==
|
||||
dependencies:
|
||||
buffer-from "^1.0.0"
|
||||
source-map "^0.6.0"
|
||||
@ -10250,9 +10255,9 @@ webpack-manifest-plugin@2.0.4:
|
||||
tapable "^1.0.0"
|
||||
|
||||
webpack-sources@^1.1.0, webpack-sources@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85"
|
||||
integrity sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.0.tgz#be93d629601aa3ea48e8686ee4d78d9c4e706061"
|
||||
integrity sha512-1e4Cxgqfl8vnDhXMMpegX7JWWP7HwV8Kp8/Oefs6EG52bRtOR9vuOXM1Gl1vy6NwHfUxHeuR6ElD4HamuRPO0A==
|
||||
dependencies:
|
||||
source-list-map "^2.0.0"
|
||||
source-map "~0.6.1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user