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 (
|
||||
<PageWrapper {...page} layout={WorkbenchLayout} header={Null}>
|
||||
<Workbench
|
||||
design={pattern.design}
|
||||
design={pattern?.design}
|
||||
from={{ type: 'pattern', data: pattern }}
|
||||
{...{ Design, DynamicDocs, baseSettings }}
|
||||
/>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { useState, useEffect, useContext, useCallback } from 'react'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
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'
|
||||
// Hooks
|
||||
import { useDropzone } from 'react-dropzone'
|
||||
|
@ -16,9 +16,8 @@ import { ModalContext } from 'shared/context/modal-context.mjs'
|
|||
// Components
|
||||
import Link from 'next/link'
|
||||
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 { ModalDesignPicker } from 'shared/components/modal/design-picker.mjs'
|
||||
import {
|
||||
OkIcon,
|
||||
NoIcon,
|
||||
|
@ -349,7 +348,7 @@ export const EditSectionTitle = ({ title }) => (
|
|||
)
|
||||
|
||||
const EditPattern = (props) => {
|
||||
const { account, pattern, t, setModal } = props
|
||||
const { account, pattern, t } = props
|
||||
|
||||
return (
|
||||
<div className="p-2 lg:p-4">
|
||||
|
@ -575,8 +574,7 @@ export const Patterns = ({ standAlone = false }) => {
|
|||
const { account, token } = useAccount()
|
||||
const backend = useBackend(token)
|
||||
const { t } = useTranslation(ns)
|
||||
const toast = useToast()
|
||||
const { CollapseButton, closeCollapseButton } = useCollapseButton()
|
||||
const { CollapseButton } = useCollapseButton()
|
||||
|
||||
// State
|
||||
const [patterns, setPatterns] = useState([])
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
import { siteConfig } from 'site/site.config.mjs'
|
||||
import yaml from 'js-yaml'
|
||||
// Hooks
|
||||
import { useContext, useState } from 'react'
|
||||
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'
|
||||
import { useBugsnag } from 'site/hooks/use-bugsnag.mjs'
|
||||
// Context
|
||||
import { ModalContext } from 'shared/context/modal-context.mjs'
|
||||
import { LoadingContext } from 'shared/context/loading-context.mjs'
|
||||
// Components
|
||||
import { ModalWrapper } from 'shared/components/wrappers/modal.mjs'
|
||||
import { ChoiceButton } from 'shared/components/choice-button.mjs'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Hooks
|
||||
import { useState, useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
// Context
|
||||
import { ModalContext } from 'shared/context/modal-context.mjs'
|
||||
|
|
|
@ -15,7 +15,6 @@ import {
|
|||
MarginSettingInput,
|
||||
OnlySettingInput,
|
||||
PaperlessSettingInput,
|
||||
RendererSettingInput,
|
||||
SaBoolSettingInput,
|
||||
SaMmSettingInput,
|
||||
ScaleSettingInput,
|
||||
|
@ -27,7 +26,6 @@ import {
|
|||
MarginSettingValue,
|
||||
OnlySettingValue,
|
||||
PaperlessSettingValue,
|
||||
RendererSettingValue,
|
||||
SaBoolSettingValue,
|
||||
SaMmSettingValue,
|
||||
ScaleSettingValue,
|
||||
|
@ -41,7 +39,6 @@ const values = {
|
|||
margin: MarginSettingValue,
|
||||
only: OnlySettingValue,
|
||||
paperless: PaperlessSettingValue,
|
||||
renderer: RendererSettingValue,
|
||||
sabool: SaBoolSettingValue,
|
||||
samm: SaMmSettingValue,
|
||||
scale: ScaleSettingValue,
|
||||
|
@ -55,7 +52,6 @@ const inputs = {
|
|||
margin: MarginSettingInput,
|
||||
only: OnlySettingInput,
|
||||
paperless: PaperlessSettingInput,
|
||||
renderer: RendererSettingInput,
|
||||
sabool: SaBoolSettingInput,
|
||||
samm: SaMmSettingInput,
|
||||
scale: ScaleSettingInput,
|
||||
|
@ -226,18 +222,6 @@ export const CoreSettings = ({
|
|||
}
|
||||
: 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 (
|
||||
<>
|
||||
<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 { Collapse } from 'shared/components/collapse.mjs'
|
||||
import { HelpIcon, DesktopIcon, ClearIcon } from 'shared/components/icons.mjs'
|
||||
import { ControlSettingInput, RendererSettingInput, XRaySettingInput } from './inputs.mjs'
|
||||
import { ControlSettingValue, RendererSettingValue, XRaySettingValue } from './values.mjs'
|
||||
import { ControlSettingInput, RendererSettingInput } from './inputs.mjs'
|
||||
import { ControlSettingValue, RendererSettingValue } from './values.mjs'
|
||||
//import { ConsoleLog } from './log.mjs'
|
||||
//import { XrayReset } from './reset.mjs'
|
||||
//import { XrayList } from './list.mjs'
|
||||
|
@ -147,18 +147,6 @@ export const UiSettings = ({ design, update, settings, ui, control, language, Dy
|
|||
}
|
||||
: 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 (
|
||||
<>
|
||||
<div className="px-2 mt-8">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue