chore(shared): Deepscan warnings
This commit is contained in:
parent
86586001ae
commit
f1154d149c
6 changed files with 9 additions and 40 deletions
|
@ -45,7 +45,7 @@ const EditPatternPage = ({ page, id }) => {
|
||||||
return (
|
return (
|
||||||
<PageWrapper {...page} layout={WorkbenchLayout} header={Null}>
|
<PageWrapper {...page} layout={WorkbenchLayout} header={Null}>
|
||||||
<Workbench
|
<Workbench
|
||||||
design={pattern.design}
|
design={pattern?.design}
|
||||||
from={{ type: 'pattern', data: pattern }}
|
from={{ type: 'pattern', data: pattern }}
|
||||||
{...{ Design, DynamicDocs, baseSettings }}
|
{...{ Design, DynamicDocs, baseSettings }}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { useState, useEffect, useContext, useCallback } from 'react'
|
import { useState, useEffect, useContext, useCallback } from 'react'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
import orderBy from 'lodash.orderby'
|
import orderBy from 'lodash.orderby'
|
||||||
import { formatMm, capitalize } from 'shared/utils.mjs'
|
import { capitalize } from 'shared/utils.mjs'
|
||||||
import { freeSewingConfig as conf } from 'shared/config/freesewing.config.mjs'
|
import { freeSewingConfig as conf } from 'shared/config/freesewing.config.mjs'
|
||||||
// Hooks
|
// Hooks
|
||||||
import { useDropzone } from 'react-dropzone'
|
import { useDropzone } from 'react-dropzone'
|
||||||
|
@ -16,9 +16,8 @@ import { ModalContext } from 'shared/context/modal-context.mjs'
|
||||||
// Components
|
// Components
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { PageLink } from 'shared/components/page-link.mjs'
|
import { PageLink } from 'shared/components/page-link.mjs'
|
||||||
import { Collapse, useCollapseButton, MimicCollapseLink } from 'shared/components/collapse.mjs'
|
import { Collapse, MimicCollapseLink } from 'shared/components/collapse.mjs'
|
||||||
import { BackToAccountButton, Choice } from './shared.mjs'
|
import { BackToAccountButton, Choice } from './shared.mjs'
|
||||||
import { ModalDesignPicker } from 'shared/components/modal/design-picker.mjs'
|
|
||||||
import {
|
import {
|
||||||
OkIcon,
|
OkIcon,
|
||||||
NoIcon,
|
NoIcon,
|
||||||
|
@ -349,7 +348,7 @@ export const EditSectionTitle = ({ title }) => (
|
||||||
)
|
)
|
||||||
|
|
||||||
const EditPattern = (props) => {
|
const EditPattern = (props) => {
|
||||||
const { account, pattern, t, setModal } = props
|
const { account, pattern, t } = props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="p-2 lg:p-4">
|
<div className="p-2 lg:p-4">
|
||||||
|
@ -575,8 +574,7 @@ export const Patterns = ({ standAlone = false }) => {
|
||||||
const { account, token } = useAccount()
|
const { account, token } = useAccount()
|
||||||
const backend = useBackend(token)
|
const backend = useBackend(token)
|
||||||
const { t } = useTranslation(ns)
|
const { t } = useTranslation(ns)
|
||||||
const toast = useToast()
|
const { CollapseButton } = useCollapseButton()
|
||||||
const { CollapseButton, closeCollapseButton } = useCollapseButton()
|
|
||||||
|
|
||||||
// State
|
// State
|
||||||
const [patterns, setPatterns] = useState([])
|
const [patterns, setPatterns] = useState([])
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
import { siteConfig } from 'site/site.config.mjs'
|
import { siteConfig } from 'site/site.config.mjs'
|
||||||
import yaml from 'js-yaml'
|
import yaml from 'js-yaml'
|
||||||
// Hooks
|
// Hooks
|
||||||
import { useContext, useState } from 'react'
|
import { useContext } from 'react'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
import { useAccount } from 'shared/hooks/use-account.mjs'
|
import { useAccount } from 'shared/hooks/use-account.mjs'
|
||||||
import { useBackend } from 'shared/hooks/use-backend.mjs'
|
import { useBackend } from 'shared/hooks/use-backend.mjs'
|
||||||
import { useBugsnag } from 'site/hooks/use-bugsnag.mjs'
|
import { useBugsnag } from 'site/hooks/use-bugsnag.mjs'
|
||||||
// Context
|
// Context
|
||||||
import { ModalContext } from 'shared/context/modal-context.mjs'
|
import { ModalContext } from 'shared/context/modal-context.mjs'
|
||||||
import { LoadingContext } from 'shared/context/loading-context.mjs'
|
|
||||||
// Components
|
// Components
|
||||||
import { ModalWrapper } from 'shared/components/wrappers/modal.mjs'
|
import { ModalWrapper } from 'shared/components/wrappers/modal.mjs'
|
||||||
import { ChoiceButton } from 'shared/components/choice-button.mjs'
|
import { ChoiceButton } from 'shared/components/choice-button.mjs'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Hooks
|
// Hooks
|
||||||
import { useState, useContext } from 'react'
|
import { useContext } from 'react'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
// Context
|
// Context
|
||||||
import { ModalContext } from 'shared/context/modal-context.mjs'
|
import { ModalContext } from 'shared/context/modal-context.mjs'
|
||||||
|
|
|
@ -15,7 +15,6 @@ import {
|
||||||
MarginSettingInput,
|
MarginSettingInput,
|
||||||
OnlySettingInput,
|
OnlySettingInput,
|
||||||
PaperlessSettingInput,
|
PaperlessSettingInput,
|
||||||
RendererSettingInput,
|
|
||||||
SaBoolSettingInput,
|
SaBoolSettingInput,
|
||||||
SaMmSettingInput,
|
SaMmSettingInput,
|
||||||
ScaleSettingInput,
|
ScaleSettingInput,
|
||||||
|
@ -27,7 +26,6 @@ import {
|
||||||
MarginSettingValue,
|
MarginSettingValue,
|
||||||
OnlySettingValue,
|
OnlySettingValue,
|
||||||
PaperlessSettingValue,
|
PaperlessSettingValue,
|
||||||
RendererSettingValue,
|
|
||||||
SaBoolSettingValue,
|
SaBoolSettingValue,
|
||||||
SaMmSettingValue,
|
SaMmSettingValue,
|
||||||
ScaleSettingValue,
|
ScaleSettingValue,
|
||||||
|
@ -41,7 +39,6 @@ const values = {
|
||||||
margin: MarginSettingValue,
|
margin: MarginSettingValue,
|
||||||
only: OnlySettingValue,
|
only: OnlySettingValue,
|
||||||
paperless: PaperlessSettingValue,
|
paperless: PaperlessSettingValue,
|
||||||
renderer: RendererSettingValue,
|
|
||||||
sabool: SaBoolSettingValue,
|
sabool: SaBoolSettingValue,
|
||||||
samm: SaMmSettingValue,
|
samm: SaMmSettingValue,
|
||||||
scale: ScaleSettingValue,
|
scale: ScaleSettingValue,
|
||||||
|
@ -55,7 +52,6 @@ const inputs = {
|
||||||
margin: MarginSettingInput,
|
margin: MarginSettingInput,
|
||||||
only: OnlySettingInput,
|
only: OnlySettingInput,
|
||||||
paperless: PaperlessSettingInput,
|
paperless: PaperlessSettingInput,
|
||||||
renderer: RendererSettingInput,
|
|
||||||
sabool: SaBoolSettingInput,
|
sabool: SaBoolSettingInput,
|
||||||
samm: SaMmSettingInput,
|
samm: SaMmSettingInput,
|
||||||
scale: ScaleSettingInput,
|
scale: ScaleSettingInput,
|
||||||
|
@ -226,18 +222,6 @@ export const CoreSettings = ({
|
||||||
}
|
}
|
||||||
: false
|
: false
|
||||||
|
|
||||||
const openButtons = []
|
|
||||||
if (loadDocs)
|
|
||||||
openButtons.push(
|
|
||||||
<button
|
|
||||||
className="btn btn-xs btn-ghost px-0 z-10"
|
|
||||||
key="help"
|
|
||||||
onClick={(evt) => loadDocs(evt)}
|
|
||||||
>
|
|
||||||
<HelpIcon className="w-4 h-4" />
|
|
||||||
</button>
|
|
||||||
)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="px-2 mt-8">
|
<div className="px-2 mt-8">
|
||||||
|
|
|
@ -9,8 +9,8 @@ import { ModalContext } from 'shared/context/modal-context.mjs'
|
||||||
import { ModalWrapper } from 'shared/components/wrappers/modal.mjs'
|
import { ModalWrapper } from 'shared/components/wrappers/modal.mjs'
|
||||||
import { Collapse } from 'shared/components/collapse.mjs'
|
import { Collapse } from 'shared/components/collapse.mjs'
|
||||||
import { HelpIcon, DesktopIcon, ClearIcon } from 'shared/components/icons.mjs'
|
import { HelpIcon, DesktopIcon, ClearIcon } from 'shared/components/icons.mjs'
|
||||||
import { ControlSettingInput, RendererSettingInput, XRaySettingInput } from './inputs.mjs'
|
import { ControlSettingInput, RendererSettingInput } from './inputs.mjs'
|
||||||
import { ControlSettingValue, RendererSettingValue, XRaySettingValue } from './values.mjs'
|
import { ControlSettingValue, RendererSettingValue } from './values.mjs'
|
||||||
//import { ConsoleLog } from './log.mjs'
|
//import { ConsoleLog } from './log.mjs'
|
||||||
//import { XrayReset } from './reset.mjs'
|
//import { XrayReset } from './reset.mjs'
|
||||||
//import { XrayList } from './list.mjs'
|
//import { XrayList } from './list.mjs'
|
||||||
|
@ -147,18 +147,6 @@ export const UiSettings = ({ design, update, settings, ui, control, language, Dy
|
||||||
}
|
}
|
||||||
: false
|
: false
|
||||||
|
|
||||||
const openButtons = []
|
|
||||||
if (loadDocs)
|
|
||||||
openButtons.push(
|
|
||||||
<button
|
|
||||||
className="btn btn-xs btn-ghost px-0 z-10"
|
|
||||||
key="help"
|
|
||||||
onClick={(evt) => loadDocs(evt)}
|
|
||||||
>
|
|
||||||
<HelpIcon className="w-4 h-4" />
|
|
||||||
</button>
|
|
||||||
)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="px-2 mt-8">
|
<div className="px-2 mt-8">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue