chore: Linter warnings
This commit is contained in:
parent
b822e35fbe
commit
6b26d71e28
6 changed files with 24 additions and 83 deletions
|
@ -5,21 +5,6 @@ const common = {
|
|||
security: [jwt, key],
|
||||
}
|
||||
|
||||
const local = {
|
||||
params: {
|
||||
id: {
|
||||
in: 'path',
|
||||
name: 'id',
|
||||
required: true,
|
||||
description: "The Set's unique ID",
|
||||
schema: {
|
||||
example: 666,
|
||||
type: 'integer',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Paths
|
||||
export const paths = {}
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { log } from '../utils/log.mjs'
|
||||
import { UserModel } from './user.mjs'
|
||||
import { i18nUrl } from '../utils/index.mjs'
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Dependencies
|
||||
import { siteConfig } from 'site/site.config.mjs'
|
||||
import translators from 'site/prebuild/translators.json'
|
||||
// Context
|
||||
import { LoadingContext } from 'shared/context/loading-context.mjs'
|
||||
|
@ -8,10 +7,8 @@ import { useAccount } from 'shared/hooks/use-account.mjs'
|
|||
import { useBackend } from 'shared/hooks/use-backend.mjs'
|
||||
import { useToast } from 'shared/hooks/use-toast.mjs'
|
||||
import { useState, useContext } from 'react'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
// Components
|
||||
import { ChoiceButton } from 'shared/components/choice-button.mjs'
|
||||
import { I18nIcon } from 'shared/components/icons.mjs'
|
||||
import { Popout } from 'shared/components/popout.mjs'
|
||||
import { WebLink } from 'shared/components/web-link.mjs'
|
||||
|
||||
|
@ -48,30 +45,12 @@ const languages = [
|
|||
'Turkish',
|
||||
]
|
||||
|
||||
const TeamList = ({ language, t }) => {
|
||||
const count = Object.keys(translators[language]).length
|
||||
|
||||
return (
|
||||
<>
|
||||
{Object.keys(translators[language])
|
||||
.sort()
|
||||
.map((name, i) => (
|
||||
<span key={name}>
|
||||
<b>{name}</b>
|
||||
{i < count - 2 ? ', ' : i < count - 1 ? ' & ' : ' '}
|
||||
</span>
|
||||
))}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export const SuggestLanguageForm = () => {
|
||||
// Context
|
||||
const { loading, startLoading, stopLoading } = useContext(LoadingContext)
|
||||
const { startLoading, stopLoading } = useContext(LoadingContext)
|
||||
|
||||
// Hooks
|
||||
const { t } = useTranslation(ns)
|
||||
const { account, setAccount, token } = useAccount()
|
||||
const { token } = useAccount()
|
||||
const backend = useBackend(token)
|
||||
const toast = useToast()
|
||||
|
||||
|
|
|
@ -22,30 +22,13 @@ const languages = [
|
|||
...siteConfig.languagesWip,
|
||||
].sort()
|
||||
|
||||
const TeamList = ({ language, t }) => {
|
||||
const count = Object.keys(translators[language]).length
|
||||
|
||||
return (
|
||||
<>
|
||||
{Object.keys(translators[language])
|
||||
.sort()
|
||||
.map((name, i) => (
|
||||
<span key={name}>
|
||||
<b>{name}</b>
|
||||
{i < count - 2 ? ', ' : i < count - 1 ? ' & ' : ' '}
|
||||
</span>
|
||||
))}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export const TranslatorInvite = () => {
|
||||
// Context
|
||||
const { loading, startLoading, stopLoading } = useContext(LoadingContext)
|
||||
const { startLoading, stopLoading } = useContext(LoadingContext)
|
||||
|
||||
// Hooks
|
||||
const { t } = useTranslation(ns)
|
||||
const { account, setAccount, token } = useAccount()
|
||||
const { token } = useAccount()
|
||||
const backend = useBackend(token)
|
||||
const toast = useToast()
|
||||
|
||||
|
@ -97,9 +80,7 @@ export const TranslatorInvite = () => {
|
|||
<p>{t('translation:pleaseChooseTeam')}</p>
|
||||
<h5>{t('translation:whatTeam')}</h5>
|
||||
<div className="flex flex-col gap-2 lg:grid lg:grid-cols-2 gap-2 mt- mb-82">
|
||||
{languages.map((language) => {
|
||||
const count = Object.keys(translators[language]).length
|
||||
return (
|
||||
{languages.map((language) => (
|
||||
<ChoiceButton
|
||||
noMargin
|
||||
key={language}
|
||||
|
@ -118,8 +99,7 @@ export const TranslatorInvite = () => {
|
|||
))}
|
||||
</div>
|
||||
</ChoiceButton>
|
||||
)
|
||||
})}
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
|
|
@ -9,7 +9,6 @@ import { TranslationStatus } from 'site/components/crowdin/status.mjs'
|
|||
import { Translators } from 'site/components/crowdin/translators.mjs'
|
||||
import { Popout } from 'shared/components/popout.mjs'
|
||||
import { Breadcrumbs } from 'shared/components/breadcrumbs.mjs'
|
||||
import { WebLink } from 'shared/components/web-link.mjs'
|
||||
import Link from 'next/link'
|
||||
|
||||
// Translation namespaces used on this page
|
||||
|
|
|
@ -53,7 +53,6 @@ const downloadReport = async (url) => await sendApiRequest('', false, url)
|
|||
|
||||
export const prebuildCrowdin = async () => {
|
||||
const contributions = {}
|
||||
const reports = []
|
||||
for (let language of languages) {
|
||||
console.log(`Loading translator contributions for ${language}`)
|
||||
contributions[language] = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue