chore: Remove lint
This commit is contained in:
parent
0cea2696e2
commit
2ed9dd5b88
7 changed files with 4 additions and 16 deletions
|
@ -26,7 +26,7 @@ export const plugin = {
|
||||||
|
|
||||||
const fd = from.dist(via)
|
const fd = from.dist(via)
|
||||||
const td = to.dist(via)
|
const td = to.dist(via)
|
||||||
if (radius > fd || radius > td || typeof radius === 'undefined') radius = fd > td ? td : fd
|
if (radius > fd || radius > td) radius = fd > td ? td : fd
|
||||||
points[ids.start] = via.shiftTowards(from, radius)
|
points[ids.start] = via.shiftTowards(from, radius)
|
||||||
points[ids.cp1] = via.shiftTowards(from, radius * (1 - C))
|
points[ids.cp1] = via.shiftTowards(from, radius * (1 - C))
|
||||||
points[ids.cp2] = via.shiftTowards(to, radius * (1 - C))
|
points[ids.cp2] = via.shiftTowards(to, radius * (1 - C))
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
// Dependencies
|
// Dependencies
|
||||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||||
import { nsMerge, workbenchHash } from 'shared/utils.mjs'
|
import { nsMerge } from 'shared/utils.mjs'
|
||||||
// Hooks
|
// Hooks
|
||||||
import { useState, useEffect, useContext } from 'react'
|
import { useState, useEffect, useContext } from 'react'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
import { useDesign, collection } from 'site/hooks/use-design.mjs'
|
import { useDesign } from 'site/hooks/use-design.mjs'
|
||||||
import { useBackend } from 'shared/hooks/use-backend.mjs'
|
import { useBackend } from 'shared/hooks/use-backend.mjs'
|
||||||
// Context
|
// Context
|
||||||
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
|
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
|
||||||
|
@ -44,10 +44,6 @@ const EditDesignPage = ({ page, design, id }) => {
|
||||||
try {
|
try {
|
||||||
result = await backend.getPattern(id)
|
result = await backend.getPattern(id)
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
//const hash = workbenchHash({ settings: pattern.settings })
|
|
||||||
//console.log({hash})
|
|
||||||
//if (history.pushState) history.pushState(null, null, hash)
|
|
||||||
//else location.hash = hash
|
|
||||||
setPattern(result.data.pattern)
|
setPattern(result.data.pattern)
|
||||||
setLoadingStatus([true, 'backendLoadingCompleted', true, true])
|
setLoadingStatus([true, 'backendLoadingCompleted', true, true])
|
||||||
} else setLoadingStatus([true, 'backendError', true, false])
|
} else setLoadingStatus([true, 'backendError', true, false])
|
||||||
|
|
|
@ -56,14 +56,10 @@ export const ns = ['account', 'patterns', 'status']
|
||||||
|
|
||||||
export const ShowPattern = ({ id }) => {
|
export const ShowPattern = ({ id }) => {
|
||||||
// Hooks
|
// Hooks
|
||||||
const { account, control } = useAccount()
|
|
||||||
const { setLoadingStatus } = useContext(LoadingStatusContext)
|
const { setLoadingStatus } = useContext(LoadingStatusContext)
|
||||||
const backend = useBackend()
|
const backend = useBackend()
|
||||||
const { t, i18n } = useTranslation(ns)
|
const { t, i18n } = useTranslation(ns)
|
||||||
|
|
||||||
// Context
|
|
||||||
const { setModal } = useContext(ModalContext)
|
|
||||||
|
|
||||||
// State
|
// State
|
||||||
const [pattern, setPattern] = useState()
|
const [pattern, setPattern] = useState()
|
||||||
const [isOwn, setIsOwn] = useState(false)
|
const [isOwn, setIsOwn] = useState(false)
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { useDesign } from 'site/hooks/use-design.mjs'
|
import { useDesign } from 'site/hooks/use-design.mjs'
|
||||||
import { Popout } from 'shared/components/popout/index.mjs'
|
import { Popout } from 'shared/components/popout/index.mjs'
|
||||||
import { themePlugin } from '@freesewing/plugin-theme'
|
import { themePlugin } from '@freesewing/plugin-theme'
|
||||||
import { PanZoomPattern as ShowPattern } from 'shared/components/workbench/pan-zoom-pattern.mjs'
|
|
||||||
import { Pattern as ReactPattern } from 'pkgs/react-components/src/index.mjs'
|
import { Pattern as ReactPattern } from 'pkgs/react-components/src/index.mjs'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ import {
|
||||||
} from 'shared/components/icons.mjs'
|
} from 'shared/components/icons.mjs'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { MenuWrapper } from 'shared/components/workbench/menus/shared/menu-wrapper.mjs'
|
import { MenuWrapper } from 'shared/components/workbench/menus/shared/menu-wrapper.mjs'
|
||||||
import { isProduction } from 'shared/config/freesewing.config.mjs'
|
|
||||||
|
|
||||||
export const ns = ['workbench', 'sections']
|
export const ns = ['workbench', 'sections']
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ import { objUpdate, hasRequiredMeasurements, nsMerge } from 'shared/utils.mjs'
|
||||||
import { Header, ns as headerNs } from 'site/components/header/index.mjs'
|
import { Header, ns as headerNs } from 'site/components/header/index.mjs'
|
||||||
import { WorkbenchHeader } from './header.mjs'
|
import { WorkbenchHeader } from './header.mjs'
|
||||||
import { ErrorView } from 'shared/components/error/view.mjs'
|
import { ErrorView } from 'shared/components/error/view.mjs'
|
||||||
import { ModalSpinner } from 'shared/components/modal/spinner.mjs'
|
|
||||||
import { MobileMenubar } from './menus/mobile-menubar.mjs'
|
import { MobileMenubar } from './menus/mobile-menubar.mjs'
|
||||||
// Views
|
// Views
|
||||||
import { DraftView, ns as draftNs } from 'shared/components/workbench/views/draft/index.mjs'
|
import { DraftView, ns as draftNs } from 'shared/components/workbench/views/draft/index.mjs'
|
||||||
|
|
|
@ -4,10 +4,9 @@ import { ns as measieNs } from './measurements.mjs'
|
||||||
import { Accordion } from 'shared/components/accordion.mjs'
|
import { Accordion } from 'shared/components/accordion.mjs'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
import { nsMerge } from 'shared/utils.mjs'
|
import { nsMerge } from 'shared/utils.mjs'
|
||||||
import { OptionsIcon, MeasieIcon, CommunityIcon } from 'shared/components/icons.mjs'
|
import { OptionsIcon, MeasieIcon } from 'shared/components/icons.mjs'
|
||||||
import { ListInput } from 'shared/components/inputs.mjs'
|
import { ListInput } from 'shared/components/inputs.mjs'
|
||||||
import { optionsMenuStructure } from 'shared/utils.mjs'
|
import { optionsMenuStructure } from 'shared/utils.mjs'
|
||||||
import { V3Wip } from 'shared/components/v3-wip.mjs'
|
|
||||||
|
|
||||||
export const ns = nsMerge('workbench', optionsNs, measieNs)
|
export const ns = nsMerge('workbench', optionsNs, measieNs)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue