Merge remote-tracking branch 'origin/dev' into prepare-comments

This commit is contained in:
tonyrewin 2022-11-24 00:10:51 +03:00
commit 48153582fe
3 changed files with 3 additions and 4 deletions

View File

@ -73,6 +73,7 @@ module.exports = {
'unicorn/import-style': 'off', 'unicorn/import-style': 'off',
'unicorn/numeric-separators-style': 'off', 'unicorn/numeric-separators-style': 'off',
'unicorn/prefer-node-protocol': 'off', 'unicorn/prefer-node-protocol': 'off',
'unicorn/consistent-function-scoping': 'warn',
'promise/always-return': 'off', 'promise/always-return': 'off',

View File

@ -25,7 +25,7 @@
"preview": "astro preview", "preview": "astro preview",
"server": "node server/server.mjs", "server": "node server/server.mjs",
"start": "astro dev", "start": "astro dev",
"start:local": "cross-env PUBLIC_API_URL=http://localhost:8080 astro dev", "start:local": "cross-env PUBLIC_API_URL=http://127.0.0.1:8080 astro dev",
"typecheck": "astro check && tsc --noEmit", "typecheck": "astro check && tsc --noEmit",
"typecheck:watch": "tsc --noEmit --watch", "typecheck:watch": "tsc --noEmit --watch",
"vercel-build": "astro build" "vercel-build": "astro build"

View File

@ -23,8 +23,6 @@ const pseudonames = {
authors: 'authors' authors: 'authors'
} }
const nos = (s) => s.slice(0, -1)
export const StatMetrics = (props: StatMetricsProps) => { export const StatMetrics = (props: StatMetricsProps) => {
return ( return (
<div class={styles.statMetrics}> <div class={styles.statMetrics}>
@ -33,7 +31,7 @@ export const StatMetrics = (props: StatMetricsProps) => {
<span class={styles.statMetricsItem} classList={{ compact: props.compact }}> <span class={styles.statMetricsItem} classList={{ compact: props.compact }}>
{props.stat[entity] + {props.stat[entity] +
' ' + ' ' +
t(nos(pseudonames[entity] || entity)) + t((pseudonames[entity] || entity).slice(-1)) +
plural(props.stat[entity] || 0, locale() === 'ru' ? ['ов', '', 'а'] : ['s', '', 's'])} plural(props.stat[entity] || 0, locale() === 'ru' ? ['ов', '', 'а'] : ['s', '', 's'])}
</span> </span>
)} )}