1
0
Fork 0

chore: Linter issues

This commit is contained in:
joostdecock 2023-09-04 12:18:52 +02:00
parent cf3f890a95
commit 9d11005c43
30 changed files with 48 additions and 52 deletions

View file

@ -5,7 +5,6 @@ import { freeSewingConfig as conf } from 'shared/config/freesewing.config.mjs'
import { measurements } from 'config/measurements.mjs'
import { measurements as designMeasurements } from 'shared/prebuild/data/design-measurements.mjs'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
import { ModalContext } from 'shared/context/modal-context.mjs'
// Hooks
import { useState, useEffect, useContext } from 'react'

View file

@ -1,7 +1,7 @@
// Dependencies
import { nsMerge, capitalize, cloudflareImageUrl, yyyymmdd } from 'shared/utils.mjs'
// Hooks
import { useState, Fragment } from 'react'
import { useState, useContext, Fragment } from 'react'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
import { useTranslation } from 'next-i18next'

View file

@ -1,7 +1,7 @@
// Dependencies
import { nsMerge, capitalize, cloudflareImageUrl, yyyymmdd } from 'shared/utils.mjs'
// Hooks
import { useState, Fragment } from 'react'
import { useState, useContext, Fragment } from 'react'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
import { useTranslation } from 'next-i18next'

View file

@ -2,9 +2,11 @@
import dynamic from 'next/dynamic'
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { nsMerge } from 'shared/utils.mjs'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useTranslation } from 'next-i18next'
import { useState, useEffect } from 'react'
import { useState, useEffect, useContext } from 'react'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
@ -37,6 +39,7 @@ const DynamicApikey = dynamic(
const ApikeyPage = ({ page, id }) => {
const { t } = useTranslation(ns)
const backend = useBackend()
const { setLoadingStatus } = useContext(LoadingStatusContext)
const [apikey, setApikey] = useState()

View file

@ -2,6 +2,8 @@
import dynamic from 'next/dynamic'
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { nsMerge } from 'shared/utils.mjs'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useTranslation } from 'next-i18next'
import { useState, useEffect } from 'react'
@ -37,6 +39,7 @@ const DynamicBookmark = dynamic(
const BookmarkPage = ({ page, id }) => {
const { t } = useTranslation(ns)
const backend = useBackend()
const { setLoadingStatus } = useContext(LoadingStatusContext)
const [bookmark, setBookmark] = useState()

View file

@ -2,7 +2,7 @@
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { nsMerge } from 'shared/utils.mjs'
// Hooks
import { useEffect } from 'react'
import { useEffect, useContext } from 'react'
import { useRouter } from 'next/router'
import { useBackend } from 'shared/hooks/use-backend.mjs'
import { useAccount } from 'shared/hooks/use-account.mjs'

View file

@ -33,7 +33,7 @@ const TypographyPage = ({ page }) => {
setLoadingStatus(
i === 50
? [true, 'All done!', true, true]
: [true, <LoadingProgress val={i} max={50} msg={`Herding cats: ${i}/50`} />]
: [true, <LoadingProgress key={i} val={i} max={50} msg={`Herding cats: ${i}/50`} />]
),
delay
)

View file

@ -1,5 +1,5 @@
// Dependencies
import { useState, useEffect } from 'react'
import { useState, useEffect, useContext } from 'react'
import { useTranslation } from 'next-i18next'
import { DateTime } from 'luxon'
import { CopyToClipboard } from 'react-copy-to-clipboard'

View file

@ -1,5 +1,5 @@
// Dependencies
import { useState } from 'react'
import { useState, useContext } from 'react'
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'

View file

@ -1,9 +1,8 @@
// Dependencies
import { useState, useEffect, Fragment, useContext } from 'react'
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useState, useEffect, Fragment, useContext } from 'react'
import { useTranslation } from 'next-i18next'
import { useBackend } from 'shared/hooks/use-backend.mjs'
import { useRouter } from 'next/router'
// Components

View file

@ -1,5 +1,5 @@
// Dependencies
import { useState } from 'react'
import { useState, useContext } from 'react'
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
@ -51,7 +51,7 @@ export const useControlState = () => {
export const ControlSettings = ({ welcome = false, noBack = false }) => {
const { t, i18n } = useTranslation(ns)
const { selection, update, LoadingStatus } = useControlState()
const { selection, update } = useControlState()
// Helper to get the link to the next onboarding step
const nextHref = welcome

View file

@ -1,5 +1,5 @@
// Dependencies
import { useState } from 'react'
import { useState, useContext } from 'react'
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'

View file

@ -1,9 +1,8 @@
// Dependencies
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useState } from 'react'
import { useTranslation } from 'next-i18next'
import { useState, useContext } from 'react'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components
import { BackToAccountButton } from './shared.mjs'

View file

@ -1,9 +1,8 @@
// Dependencies
import { useState } from 'react'
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useState, useContext } from 'react'
import { useTranslation } from 'next-i18next'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components

View file

@ -1,10 +1,10 @@
// Dependencies
import { useState } from 'react'
import { useTranslation } from 'next-i18next'
import { cloudflareImageUrl } from 'shared/utils.mjs'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useState, useContext } from 'react'
import { useTranslation } from 'next-i18next'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components

View file

@ -1,9 +1,8 @@
// Dependencies
import { useState } from 'react'
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useState, useContext } from 'react'
import { useTranslation } from 'next-i18next'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components

View file

@ -1,9 +1,8 @@
// Dependencies
import { useState } from 'react'
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useState, useContext } from 'react'
import { useTranslation } from 'next-i18next'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components

View file

@ -1,9 +1,8 @@
// Dependencies
import { useState } from 'react'
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useState, useContext } from 'react'
import { useTranslation } from 'next-i18next'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components

View file

@ -1,9 +1,8 @@
// Dependencies
import { useState } from 'react'
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useState, useContext } from 'react'
import { useTranslation } from 'next-i18next'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components

View file

@ -1,9 +1,8 @@
// Dependencies
import { useState } from 'react'
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useState, useContext } from 'react'
import { useTranslation } from 'next-i18next'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components

View file

@ -1,8 +1,8 @@
// Dependencies
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useTranslation } from 'next-i18next'
import { useContext } from 'react'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components

View file

@ -1,8 +1,8 @@
// Dependencies
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useContext } from 'react'
import { useTranslation } from 'next-i18next'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components

View file

@ -1,8 +1,8 @@
// Dependencies
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useContext } from 'react'
import { useTranslation } from 'next-i18next'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components

View file

@ -1,9 +1,8 @@
// Dependencies
import { useState } from 'react'
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useState, useContext } from 'react'
import { useTranslation } from 'next-i18next'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components

View file

@ -4,7 +4,7 @@ import { cloudflareImageUrl, nsMerge } from 'shared/utils.mjs'
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useTranslation } from 'next-i18next'
import { useEffect, useState } from 'react'
import { useEffect, useState, useContext } from 'react'
import { useBackend } from 'shared/hooks/use-backend.mjs'
import { useRouter } from 'next/router'
// Components

View file

@ -3,7 +3,7 @@ import { freeSewingConfig as config } from 'shared/config/freesewing.config.mjs'
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useTranslation } from 'next-i18next'
import { useState, Fragment } from 'react'
import { useState, Fragment, useContext } from 'react'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
// Components

View file

@ -1,7 +1,7 @@
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useState, useEffect } from 'react'
import { useState, useEffect, useContext } from 'react'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useTranslation } from 'next-i18next'
import { useBackend } from 'shared/hooks/use-backend.mjs'

View file

@ -5,7 +5,7 @@ import { capitalize } from 'shared/utils.mjs'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useEffect, useState, useRef, useMemo } from 'react'
import { useEffect, useState, useRef, useMemo, useContext } from 'react'
import { useTranslation } from 'next-i18next'
// Components
import { CloseIcon } from 'shared/components/icons.mjs'

View file

@ -1,5 +1,5 @@
// Dependencies
import { Fragment } from 'react'
import { Fragment, useContext } from 'react'
import { nsMerge } from 'shared/utils.mjs'
import { ns as authNs } from 'shared/components/wrappers/auth/index.mjs'
import { designMeasurements, horFlexClasses } from 'shared/utils.mjs'

View file

@ -4,7 +4,7 @@ import yaml from 'js-yaml'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useState } from 'react'
import { useState, useContext } from 'react'
import { useTranslation } from 'next-i18next'
import { useRouter } from 'next/router'
import { useBackend } from 'shared/hooks/use-backend.mjs'