mirror of
https://github.com/uetchy/namae.git
synced 2025-03-17 04:30:31 +09:00
cosmetic changes
This commit is contained in:
parent
a9182fb125
commit
ec50b37f3b
12
package.json
12
package.json
@ -12,15 +12,15 @@
|
|||||||
"typescript": "^3.8.3"
|
"typescript": "^3.8.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sentry/cli": "^1.52.1",
|
"@sentry/cli": "^1.52.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^2.26.0",
|
"@typescript-eslint/eslint-plugin": "^2.30.0",
|
||||||
"@typescript-eslint/parser": "^2.26.0",
|
"@typescript-eslint/parser": "^2.30.0",
|
||||||
"codacy-coverage": "^3.4.0",
|
"codacy-coverage": "^3.4.0",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
"eslint-config-prettier": "^6.10.1",
|
"eslint-config-prettier": "^6.11.0",
|
||||||
"eslint-plugin-react": "^7.19.0",
|
"eslint-plugin-react": "^7.19.0",
|
||||||
"husky": "^4.2.3",
|
"husky": "^4.2.5",
|
||||||
"prettier": "^2.0.2",
|
"prettier": "^2.0.5",
|
||||||
"pretty-quick": "^2.0.1"
|
"pretty-quick": "^2.0.1"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
"test": "react-scripts test --coverage"
|
"test": "react-scripts test --coverage"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry/browser": "^5.15.4",
|
"@sentry/browser": "^5.15.5",
|
||||||
"easy-peasy": "^3.3.0",
|
"easy-peasy": "^3.3.0",
|
||||||
"fetch-suspense": "^1.2.2",
|
"fetch-suspense": "^1.2.2",
|
||||||
"framer-motion": "^1.10.3",
|
"framer-motion": "^1.10.3",
|
||||||
"i18next": ">=19.3.4",
|
"i18next": ">=19.4.4",
|
||||||
"i18next-browser-languagedetector": "^4.0.2",
|
"i18next-browser-languagedetector": "^4.1.1",
|
||||||
"i18next-chained-backend": "^2.0.1",
|
"i18next-chained-backend": "^2.0.1",
|
||||||
"i18next-localstorage-backend": "^3.1.1",
|
"i18next-localstorage-backend": "^3.1.1",
|
||||||
"i18next-xhr-backend": "^3.2.2",
|
"i18next-xhr-backend": "^3.2.2",
|
||||||
@ -28,12 +28,12 @@
|
|||||||
"react-ga": "^2.7.0",
|
"react-ga": "^2.7.0",
|
||||||
"react-helmet": "^6.0.0",
|
"react-helmet": "^6.0.0",
|
||||||
"react-i18next": "11.4.0",
|
"react-i18next": "11.4.0",
|
||||||
"react-icons": "^3.9.0",
|
"react-icons": "^3.10.0",
|
||||||
"react-router": "^5.1.2",
|
"react-router": "^5.1.2",
|
||||||
"react-router-dom": "^5.1.2",
|
"react-router-dom": "^5.1.2",
|
||||||
"react-scripts": "3.4.1",
|
"react-scripts": "3.4.1",
|
||||||
"react-spinners": "^0.8.1",
|
"react-spinners": "^0.8.1",
|
||||||
"styled-components": "^5.0.1"
|
"styled-components": "^5.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@testing-library/jest-dom": "^5.3.0",
|
"@testing-library/jest-dom": "^5.3.0",
|
||||||
|
@ -102,7 +102,8 @@ function Stat() {
|
|||||||
const availableCount = useStoreState((state) => state.stats.availableCount);
|
const availableCount = useStoreState((state) => state.stats.availableCount);
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
|
|
||||||
const uniqueness = ((n) => {
|
const uniqueness = availableCount / totalCount;
|
||||||
|
const uniquenessText = ((n) => {
|
||||||
if (n > 0.7 && n <= 1.0) {
|
if (n > 0.7 && n <= 1.0) {
|
||||||
return t('uniqueness.high');
|
return t('uniqueness.high');
|
||||||
} else if (n > 0.4 && n <= 0.7) {
|
} else if (n > 0.4 && n <= 0.7) {
|
||||||
@ -110,9 +111,13 @@ function Stat() {
|
|||||||
} else {
|
} else {
|
||||||
return t('uniqueness.low');
|
return t('uniqueness.low');
|
||||||
}
|
}
|
||||||
})(availableCount / totalCount);
|
})(uniqueness);
|
||||||
|
|
||||||
return <UniquenessIndicator>{uniqueness}</UniquenessIndicator>;
|
return (
|
||||||
|
<UniquenessIndicator>
|
||||||
|
{uniquenessText} ({uniqueness.toFixed(2)})
|
||||||
|
</UniquenessIndicator>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const GlobalStyle = createGlobalStyle`
|
const GlobalStyle = createGlobalStyle`
|
||||||
|
@ -36,22 +36,22 @@ const Index: React.FC<{query: string}> = ({query}) => {
|
|||||||
<Cards>
|
<Cards>
|
||||||
<DomainCard query={query} />
|
<DomainCard query={query} />
|
||||||
<GithubCard query={query} />
|
<GithubCard query={query} />
|
||||||
<GitLabCard query={query} />
|
<TwitterCard query={query} />
|
||||||
<NpmCard query={query} />
|
<NpmCard query={query} />
|
||||||
|
<HomebrewCard query={query} />
|
||||||
|
<GitLabCard query={query} />
|
||||||
<PypiCard query={query} />
|
<PypiCard query={query} />
|
||||||
<CratesioCard query={query} />
|
<CratesioCard query={query} />
|
||||||
<RubyGemsCard query={query} />
|
<RubyGemsCard query={query} />
|
||||||
<OcamlCard query={query} />
|
|
||||||
<HomebrewCard query={query} />
|
|
||||||
<LinuxCard query={query} />
|
<LinuxCard query={query} />
|
||||||
<TwitterCard query={query} />
|
<OcamlCard query={query} />
|
||||||
<InstagramCard query={query} />
|
|
||||||
<SpectrumCard query={query} />
|
|
||||||
<SlackCard query={query} />
|
|
||||||
<HerokuCard query={query} />
|
|
||||||
<NowCard query={query} />
|
<NowCard query={query} />
|
||||||
|
<HerokuCard query={query} />
|
||||||
<NetlifyCard query={query} />
|
<NetlifyCard query={query} />
|
||||||
<JsOrgCard query={query} />
|
<JsOrgCard query={query} />
|
||||||
|
<SlackCard query={query} />
|
||||||
|
<InstagramCard query={query} />
|
||||||
|
<SpectrumCard query={query} />
|
||||||
<S3Card query={query} />
|
<S3Card query={query} />
|
||||||
</Cards>
|
</Cards>
|
||||||
<Cards>
|
<Cards>
|
||||||
|
@ -23,12 +23,12 @@ const DomainCard: React.FC<{query: string}> = ({query}) => {
|
|||||||
`${lowerCase}.com`,
|
`${lowerCase}.com`,
|
||||||
`${lowerCase}app.com`,
|
`${lowerCase}app.com`,
|
||||||
`${lowerCase}.app`,
|
`${lowerCase}.app`,
|
||||||
|
`${lowerCase}.dev`,
|
||||||
|
`${lowerCase}.org`,
|
||||||
`${lowerCase}.io`,
|
`${lowerCase}.io`,
|
||||||
...domainHackSuggestions,
|
...domainHackSuggestions,
|
||||||
];
|
];
|
||||||
const moreNames = [
|
const moreNames = [
|
||||||
`${lowerCase}.dev`,
|
|
||||||
`${lowerCase}.org`,
|
|
||||||
`${lowerCase}.sh`,
|
`${lowerCase}.sh`,
|
||||||
`${lowerCase}.tools`,
|
`${lowerCase}.tools`,
|
||||||
`${lowerCase}.design`,
|
`${lowerCase}.design`,
|
||||||
|
@ -8,13 +8,8 @@ const GithubCard: React.FC<{query: string}> = ({query}) => {
|
|||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const lowerCase = query.toLowerCase();
|
const lowerCase = query.toLowerCase();
|
||||||
|
|
||||||
const names = [query, `${lowerCase}-dev`];
|
const names = [query, `${lowerCase}-dev`, `${lowerCase}-team`];
|
||||||
const moreNames = [
|
const moreNames = [`${lowerCase}hq`, `${lowerCase}-org`, `${lowerCase}js`];
|
||||||
`${lowerCase}hq`,
|
|
||||||
`${lowerCase}-team`,
|
|
||||||
`${lowerCase}-org`,
|
|
||||||
`${lowerCase}js`,
|
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card title={t('providers.github')}>
|
<Card title={t('providers.github')}>
|
||||||
|
@ -8,8 +8,8 @@ const NpmCard: React.FC<{query: string}> = ({query}) => {
|
|||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const lowerCase = query.toLowerCase();
|
const lowerCase = query.toLowerCase();
|
||||||
|
|
||||||
const names = [lowerCase];
|
const names = [lowerCase, `${lowerCase}-js`];
|
||||||
const moreNames = [`${lowerCase}-js`];
|
const moreNames = [`${lowerCase}js`];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card title={t('providers.npm')}>
|
<Card title={t('providers.npm')}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user