- {(name) => (
- }
- />
- )}
+
+
+ {(name) => (
+ }
+ />
+ )}
+
)
}
diff --git a/web/src/components/cards/GithubSearchCard.js b/web/src/components/cards/GithubSearchCard.js
index d06a394..b13222a 100644
--- a/web/src/components/cards/GithubSearchCard.js
+++ b/web/src/components/cards/GithubSearchCard.js
@@ -1,26 +1,38 @@
import React from 'react'
+import useFetch from 'fetch-suspense'
import { useTranslation } from 'react-i18next'
import { FaGithub } from 'react-icons/fa'
-import fetch from 'isomorphic-unfetch'
-import { CustomSearchCard } from '../Cards'
-export default function GithubSearchCard({ name }) {
+import { Card, Result } from '../Cards'
+
+function Search({ query }) {
+ const searchQuery = encodeURIComponent(`${query} in:name`)
+ const response = useFetch(
+ `https://api.github.com/search/repositories?q=${searchQuery}&per_page=3`
+ )
+ const repos = response.items
+
+ return (
+
+ {repos.map((repo) => (
+ }
+ key={repo.id}
+ />
+ ))}
+
+ )
+}
+
+export default function GithubSearchCard({ query }) {
const { t } = useTranslation()
return (
- }>
- {async (query) => {
- const response = await fetch(
- `https://api.github.com/repos/search?q=${query}`
- )
- const data = await response.json()
- console.log(data)
- }}
-
+
+
+
)
}
diff --git a/web/src/components/cards/HomebrewCard.js b/web/src/components/cards/HomebrewCard.js
index 57724ec..f280899 100644
--- a/web/src/components/cards/HomebrewCard.js
+++ b/web/src/components/cards/HomebrewCard.js
@@ -1,32 +1,36 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import { IoIosBeer } from 'react-icons/io'
-import { Card } from '../Cards'
-import { ExistentialAvailability } from '../Cards'
+
+import { Card, Repeater, ExistentialAvailability } from '../Cards'
export default function HomebrewCard({ name }) {
const { t } = useTranslation()
const lowerCase = name.toLowerCase()
+ const names = [lowerCase]
+
return (
-
- {(name) => (
- <>
- }
- />
- }
- />
- >
- )}
+
+
+ {(name) => (
+ <>
+ }
+ />
+ }
+ />
+ >
+ )}
+
)
}
diff --git a/web/src/components/cards/JsOrgCard.js b/web/src/components/cards/JsOrgCard.js
index 8abc9f8..f9481a5 100644
--- a/web/src/components/cards/JsOrgCard.js
+++ b/web/src/components/cards/JsOrgCard.js
@@ -1,23 +1,27 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import { FaJsSquare } from 'react-icons/fa'
-import { Card } from '../Cards'
-import { DedicatedAvailability } from '../Cards'
+
+import { Card, Repeater, DedicatedAvailability } from '../Cards'
export default function JsOrgCard({ name }) {
const { t } = useTranslation()
const lowerCase = name.toLowerCase()
+ const names = [lowerCase]
+
return (
-
- {(name) => (
- }
- />
- )}
+
+
+ {(name) => (
+ }
+ />
+ )}
+
)
}
diff --git a/web/src/components/cards/LinuxCard.js b/web/src/components/cards/LinuxCard.js
index 1187c52..bac6db3 100644
--- a/web/src/components/cards/LinuxCard.js
+++ b/web/src/components/cards/LinuxCard.js
@@ -2,33 +2,37 @@ import React from 'react'
import { useTranslation } from 'react-i18next'
import { DiUbuntu } from 'react-icons/di'
import { DiDebian } from 'react-icons/di'
-import { Card } from '../Cards'
-import { DedicatedAvailability } from '../Cards'
+
+import { Card, Repeater, DedicatedAvailability } from '../Cards'
export default function LinuxCard({ name }) {
const { t } = useTranslation()
const lowerCase = name.toLowerCase()
+ const names = [lowerCase]
+
return (
-
- {(name) => (
- <>
- }
- />
- }
- />
- >
- )}
+
+
+ {(name) => (
+ <>
+ }
+ />
+ }
+ />
+ >
+ )}
+
)
}
diff --git a/web/src/components/cards/NpmCard.js b/web/src/components/cards/NpmCard.js
index a5ae537..5224cc6 100644
--- a/web/src/components/cards/NpmCard.js
+++ b/web/src/components/cards/NpmCard.js
@@ -1,36 +1,38 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import { FaNpm } from 'react-icons/fa'
-import { Card } from '../Cards'
-import { DedicatedAvailability } from '../Cards'
+
+import { Card, Repeater, DedicatedAvailability } from '../Cards'
export default function NpmCard({ name }) {
const { t } = useTranslation()
const lowerCase = name.toLowerCase()
+ const names = [lowerCase]
+ const moreNames = [`${lowerCase}-js`]
+
return (
-
- {(name) => (
- <>
- }
- />
- }
- />
- >
- )}
+
+
+ {(name) => (
+ <>
+ }
+ />
+ }
+ />
+ >
+ )}
+
)
}
diff --git a/web/src/components/cards/PypiCard.js b/web/src/components/cards/PypiCard.js
index 9ab7dd2..4d543ac 100644
--- a/web/src/components/cards/PypiCard.js
+++ b/web/src/components/cards/PypiCard.js
@@ -1,26 +1,28 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import { FaPython } from 'react-icons/fa'
-import { Card } from '../Cards'
-import { DedicatedAvailability } from '../Cards'
+
import { capitalize } from '../../util/text'
+import { Card, DedicatedAvailability, Repeater } from '../Cards'
export default function PypiCard({ name }) {
const { t } = useTranslation()
+ const names = [name]
+ const moreNames = [`Py${capitalize(name)}`]
+
return (
-
- {(name) => (
- }
- />
- )}
+
+
+ {(name) => (
+ }
+ />
+ )}
+
)
}
diff --git a/web/src/components/cards/RubyGemsCard.js b/web/src/components/cards/RubyGemsCard.js
index 7d0b5ee..566b221 100644
--- a/web/src/components/cards/RubyGemsCard.js
+++ b/web/src/components/cards/RubyGemsCard.js
@@ -1,25 +1,27 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import { FaGem } from 'react-icons/fa'
-import { Card } from '../Cards'
-import { DedicatedAvailability } from '../Cards'
+
+import { Card, Repeater, DedicatedAvailability } from '../Cards'
export default function RubyGemsCard({ name }) {
const { t } = useTranslation()
+ const names = [name]
+ const moreNames = [`${name.toLowerCase()}-rb`]
+
return (
-
- {(name) => (
- }
- />
- )}
+
+
+ {(name) => (
+ }
+ />
+ )}
+
)
}
diff --git a/web/src/components/cards/S3Card.js b/web/src/components/cards/S3Card.js
index d5bc36c..6c32573 100644
--- a/web/src/components/cards/S3Card.js
+++ b/web/src/components/cards/S3Card.js
@@ -1,24 +1,28 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import { FaAws } from 'react-icons/fa'
-import { Card } from '../Cards'
-import { DedicatedAvailability } from '../Cards'
+
+import { Card, DedicatedAvailability, Repeater } from '../Cards'
export default function S3Card({ name }) {
const { t } = useTranslation()
const lowerCase = name.toLowerCase()
+ const names = [lowerCase]
+
return (
-
- {(name) => (
- }
- />
- )}
+
+
+ {(name) => (
+ }
+ />
+ )}
+
)
}
diff --git a/web/src/components/cards/SlackCard.js b/web/src/components/cards/SlackCard.js
index 2d222e1..03d28e9 100644
--- a/web/src/components/cards/SlackCard.js
+++ b/web/src/components/cards/SlackCard.js
@@ -1,24 +1,28 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import { FaSlack } from 'react-icons/fa'
-import { Card } from '../Cards'
-import { DedicatedAvailability } from '../Cards'
+
+import { Card, DedicatedAvailability, Repeater } from '../Cards'
export default function SlackCard({ name }) {
const { t } = useTranslation()
const lowerCase = name.toLowerCase()
+ const names = [lowerCase]
+
return (
-
- {(name) => (
- }
- />
- )}
+
+
+ {(name) => (
+ }
+ />
+ )}
+
)
}
diff --git a/web/src/components/cards/TwitterCard.js b/web/src/components/cards/TwitterCard.js
index c6b4f15..1d32af7 100644
--- a/web/src/components/cards/TwitterCard.js
+++ b/web/src/components/cards/TwitterCard.js
@@ -1,34 +1,36 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import { FaTwitter } from 'react-icons/fa'
-import { Card } from '../Cards'
-import { DedicatedAvailability } from '../Cards'
+
import { capitalize } from '../../util/text'
+import { Card, Repeater, DedicatedAvailability } from '../Cards'
export default function TwitterCard({ name }) {
const { t } = useTranslation()
+ const names = [name]
+ const moreNames = [
+ `${name.toLowerCase()}app`,
+ `hey${name.toLowerCase()}`,
+ `${capitalize(name)}Team`,
+ `${capitalize(name)}HQ`,
+ `${name.toLowerCase()}_official`,
+ `${name.toLowerCase()}-support`,
+ ]
+
return (
-
- {(name) => (
- }
- />
- )}
+
+
+ {(name) => (
+ }
+ />
+ )}
+
)
}