1
0
Fork 0

chore: Remove lint

This commit is contained in:
joostdecock 2023-09-28 15:58:50 +02:00
parent 0cea2696e2
commit 2ed9dd5b88
7 changed files with 4 additions and 16 deletions

View file

@ -26,7 +26,7 @@ export const plugin = {
const fd = from.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.cp1] = via.shiftTowards(from, radius * (1 - C))
points[ids.cp2] = via.shiftTowards(to, radius * (1 - C))

View file

@ -1,10 +1,10 @@
// Dependencies
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { nsMerge, workbenchHash } from 'shared/utils.mjs'
import { nsMerge } from 'shared/utils.mjs'
// Hooks
import { useState, useEffect, useContext } from 'react'
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'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
@ -44,10 +44,6 @@ const EditDesignPage = ({ page, design, id }) => {
try {
result = await backend.getPattern(id)
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)
setLoadingStatus([true, 'backendLoadingCompleted', true, true])
} else setLoadingStatus([true, 'backendError', true, false])

View file

@ -56,14 +56,10 @@ export const ns = ['account', 'patterns', 'status']
export const ShowPattern = ({ id }) => {
// Hooks
const { account, control } = useAccount()
const { setLoadingStatus } = useContext(LoadingStatusContext)
const backend = useBackend()
const { t, i18n } = useTranslation(ns)
// Context
const { setModal } = useContext(ModalContext)
// State
const [pattern, setPattern] = useState()
const [isOwn, setIsOwn] = useState(false)

View file

@ -1,7 +1,6 @@
import { useDesign } from 'site/hooks/use-design.mjs'
import { Popout } from 'shared/components/popout/index.mjs'
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 { useTranslation } from 'next-i18next'

View file

@ -20,7 +20,6 @@ import {
} from 'shared/components/icons.mjs'
import Link from 'next/link'
import { MenuWrapper } from 'shared/components/workbench/menus/shared/menu-wrapper.mjs'
import { isProduction } from 'shared/config/freesewing.config.mjs'
export const ns = ['workbench', 'sections']

View file

@ -13,7 +13,6 @@ import { objUpdate, hasRequiredMeasurements, nsMerge } from 'shared/utils.mjs'
import { Header, ns as headerNs } from 'site/components/header/index.mjs'
import { WorkbenchHeader } from './header.mjs'
import { ErrorView } from 'shared/components/error/view.mjs'
import { ModalSpinner } from 'shared/components/modal/spinner.mjs'
import { MobileMenubar } from './menus/mobile-menubar.mjs'
// Views
import { DraftView, ns as draftNs } from 'shared/components/workbench/views/draft/index.mjs'

View file

@ -4,10 +4,9 @@ import { ns as measieNs } from './measurements.mjs'
import { Accordion } from 'shared/components/accordion.mjs'
import { useTranslation } from 'next-i18next'
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 { optionsMenuStructure } from 'shared/utils.mjs'
import { V3Wip } from 'shared/components/v3-wip.mjs'
export const ns = nsMerge('workbench', optionsNs, measieNs)