1
0
mirror of https://github.com/uetchy/namae.git synced 2025-03-16 20:20:38 +09:00

cosmetic changes

This commit is contained in:
uetchy 2020-04-30 14:05:43 +09:00
parent a9182fb125
commit ec50b37f3b
8 changed files with 1634 additions and 580 deletions

View File

@ -12,15 +12,15 @@
"typescript": "^3.8.3"
},
"devDependencies": {
"@sentry/cli": "^1.52.1",
"@typescript-eslint/eslint-plugin": "^2.26.0",
"@typescript-eslint/parser": "^2.26.0",
"@sentry/cli": "^1.52.3",
"@typescript-eslint/eslint-plugin": "^2.30.0",
"@typescript-eslint/parser": "^2.30.0",
"codacy-coverage": "^3.4.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-react": "^7.19.0",
"husky": "^4.2.3",
"prettier": "^2.0.2",
"husky": "^4.2.5",
"prettier": "^2.0.5",
"pretty-quick": "^2.0.1"
},
"husky": {

View File

@ -11,12 +11,12 @@
"test": "react-scripts test --coverage"
},
"dependencies": {
"@sentry/browser": "^5.15.4",
"@sentry/browser": "^5.15.5",
"easy-peasy": "^3.3.0",
"fetch-suspense": "^1.2.2",
"framer-motion": "^1.10.3",
"i18next": ">=19.3.4",
"i18next-browser-languagedetector": "^4.0.2",
"i18next": ">=19.4.4",
"i18next-browser-languagedetector": "^4.1.1",
"i18next-chained-backend": "^2.0.1",
"i18next-localstorage-backend": "^3.1.1",
"i18next-xhr-backend": "^3.2.2",
@ -28,12 +28,12 @@
"react-ga": "^2.7.0",
"react-helmet": "^6.0.0",
"react-i18next": "11.4.0",
"react-icons": "^3.9.0",
"react-icons": "^3.10.0",
"react-router": "^5.1.2",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.1",
"react-spinners": "^0.8.1",
"styled-components": "^5.0.1"
"styled-components": "^5.1.0"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.3.0",

View File

@ -102,7 +102,8 @@ function Stat() {
const availableCount = useStoreState((state) => state.stats.availableCount);
const {t} = useTranslation();
const uniqueness = ((n) => {
const uniqueness = availableCount / totalCount;
const uniquenessText = ((n) => {
if (n > 0.7 && n <= 1.0) {
return t('uniqueness.high');
} else if (n > 0.4 && n <= 0.7) {
@ -110,9 +111,13 @@ function Stat() {
} else {
return t('uniqueness.low');
}
})(availableCount / totalCount);
})(uniqueness);
return <UniquenessIndicator>{uniqueness}</UniquenessIndicator>;
return (
<UniquenessIndicator>
{uniquenessText} ({uniqueness.toFixed(2)})
</UniquenessIndicator>
);
}
const GlobalStyle = createGlobalStyle`

View File

@ -36,22 +36,22 @@ const Index: React.FC<{query: string}> = ({query}) => {
<Cards>
<DomainCard query={query} />
<GithubCard query={query} />
<GitLabCard query={query} />
<TwitterCard query={query} />
<NpmCard query={query} />
<HomebrewCard query={query} />
<GitLabCard query={query} />
<PypiCard query={query} />
<CratesioCard query={query} />
<RubyGemsCard query={query} />
<OcamlCard query={query} />
<HomebrewCard query={query} />
<LinuxCard query={query} />
<TwitterCard query={query} />
<InstagramCard query={query} />
<SpectrumCard query={query} />
<SlackCard query={query} />
<HerokuCard query={query} />
<OcamlCard query={query} />
<NowCard query={query} />
<HerokuCard query={query} />
<NetlifyCard query={query} />
<JsOrgCard query={query} />
<SlackCard query={query} />
<InstagramCard query={query} />
<SpectrumCard query={query} />
<S3Card query={query} />
</Cards>
<Cards>

View File

@ -23,12 +23,12 @@ const DomainCard: React.FC<{query: string}> = ({query}) => {
`${lowerCase}.com`,
`${lowerCase}app.com`,
`${lowerCase}.app`,
`${lowerCase}.dev`,
`${lowerCase}.org`,
`${lowerCase}.io`,
...domainHackSuggestions,
];
const moreNames = [
`${lowerCase}.dev`,
`${lowerCase}.org`,
`${lowerCase}.sh`,
`${lowerCase}.tools`,
`${lowerCase}.design`,

View File

@ -8,13 +8,8 @@ const GithubCard: React.FC<{query: string}> = ({query}) => {
const {t} = useTranslation();
const lowerCase = query.toLowerCase();
const names = [query, `${lowerCase}-dev`];
const moreNames = [
`${lowerCase}hq`,
`${lowerCase}-team`,
`${lowerCase}-org`,
`${lowerCase}js`,
];
const names = [query, `${lowerCase}-dev`, `${lowerCase}-team`];
const moreNames = [`${lowerCase}hq`, `${lowerCase}-org`, `${lowerCase}js`];
return (
<Card title={t('providers.github')}>

View File

@ -8,8 +8,8 @@ const NpmCard: React.FC<{query: string}> = ({query}) => {
const {t} = useTranslation();
const lowerCase = query.toLowerCase();
const names = [lowerCase];
const moreNames = [`${lowerCase}-js`];
const names = [lowerCase, `${lowerCase}-js`];
const moreNames = [`${lowerCase}js`];
return (
<Card title={t('providers.npm')}>

2148
yarn.lock

File diff suppressed because it is too large Load Diff