diff --git a/sites/dev/hooks/use-navigation.mjs b/sites/dev/hooks/use-navigation.mjs index 9ff55d7012c..8047abf1148 100644 --- a/sites/dev/hooks/use-navigation.mjs +++ b/sites/dev/hooks/use-navigation.mjs @@ -1,4 +1,3 @@ -import { useEffect } from 'react' import get from 'lodash.get' import { prebuildNavigation as pbn } from 'site/prebuild/navigation.mjs' import orderBy from 'lodash.orderby' diff --git a/sites/lab/hooks/use-navigation.mjs b/sites/lab/hooks/use-navigation.mjs index a302f9d8999..5f3bcc7847e 100644 --- a/sites/lab/hooks/use-navigation.mjs +++ b/sites/lab/hooks/use-navigation.mjs @@ -3,7 +3,7 @@ import { useTranslation } from 'next-i18next' import orderBy from 'lodash.orderby' import { freeSewingConfig as conf } from 'shared/config/freesewing.config.mjs' import { useAccount } from 'shared/hooks/use-account.mjs' -import { designs, tags } from 'shared/config/designs.mjs' +import { designs } from 'shared/config/designs.mjs' /* * prebuildNavvigation[locale] holds the navigation structure based on MDX content. diff --git a/sites/sanity/scripts/export-strapi.mjs b/sites/sanity/scripts/export-strapi.mjs index 6c31696183c..4bd856ce935 100644 --- a/sites/sanity/scripts/export-strapi.mjs +++ b/sites/sanity/scripts/export-strapi.mjs @@ -1,4 +1,3 @@ -import path from 'path' import fs from 'fs' import axios from 'axios' import { strapiHost } from '../../shared/config/freesewing.mjs' @@ -165,7 +164,7 @@ const transformNewsletterPost = async (p) => { /* * Exports newsletter posts */ -const exportNewsletterPosts = async (lang) => { +const exportNewsletterPosts = async () => { const posts = [] const strapiPosts = await getPosts('newsletter', 'en') for (const post of Object.values(strapiPosts)) { diff --git a/sites/shared/components/account/sets.mjs b/sites/shared/components/account/sets.mjs index f0720d9154e..040bd6bafe4 100644 --- a/sites/shared/components/account/sets.mjs +++ b/sites/shared/components/account/sets.mjs @@ -367,14 +367,13 @@ const EditImg = ({ t, mset, account, backend, toast, refresh, curated = false }) }, []) const { getRootProps, getInputProps } = useDropzone({ onDrop }) - const { startLoading, stopLoading } = useContext(LoadingContext) - const update = async (evt) => { - evt.preventDefault() - if (evt.target.value !== value) { - setValue(evt.target.value) - } - } + //const update = async (evt) => { + // evt.preventDefault() + // if (evt.target.value !== value) { + // setValue(evt.target.value) + // } + //} return (
@@ -536,15 +535,15 @@ const EditUnits = ({ t, mset, account, backend, toast, refresh }) => { } } - const save = async () => { - startLoading() - const result = await backend.updateSet(mset.id, { name: value }) - if (result.success) { - refresh() - toast.for.settingsSaved() - } else toast.for.backendError() - stopLoading() - } + //const save = async () => { + // startLoading() + // const result = await backend.updateSet(mset.id, { name: value }) + // if (result.success) { + // refresh() + // toast.for.settingsSaved() + // } else toast.for.backendError() + // stopLoading() + //} return ( <> diff --git a/sites/shared/components/sets/set-picker.mjs b/sites/shared/components/sets/set-picker.mjs index 6ec3cf02b80..8597d8c718f 100644 --- a/sites/shared/components/sets/set-picker.mjs +++ b/sites/shared/components/sets/set-picker.mjs @@ -85,7 +85,7 @@ export const CuratedSetPicker = ({ design, language }) => { <>

{t('curatedSets')}

{tags.map((tag) => ( - addFilter(tag)} tag={tag}> + addFilter(tag)} tag={tag} key={tag}> {tag} ))} diff --git a/sites/shared/components/workbench/index.mjs b/sites/shared/components/workbench/index.mjs index 001bb76da14..98c0420f03f 100644 --- a/sites/shared/components/workbench/index.mjs +++ b/sites/shared/components/workbench/index.mjs @@ -31,7 +31,7 @@ export const Workbench = ({ design, Design, set = false, DynamicDocs = false }) // Hooks const { t, i18n } = useTranslation(ns) const { language } = i18n - const { account, token } = useAccount() + const { account } = useAccount() const defaultSettings = loadDefaultSettings({ units: account.imperial ? 'imperial' : 'metric', diff --git a/sites/shared/components/workbench/menus/core-settings/index.mjs b/sites/shared/components/workbench/menus/core-settings/index.mjs index c7f0752a987..cb2fac163bb 100644 --- a/sites/shared/components/workbench/menus/core-settings/index.mjs +++ b/sites/shared/components/workbench/menus/core-settings/index.mjs @@ -8,7 +8,6 @@ import { loadSettingsConfig } from './config.mjs' // Components import { ModalWrapper } from 'shared/components/wrappers/modal.mjs' import { SettingsIcon, ClearIcon, HelpIcon } from 'shared/components/icons.mjs' -import Link from 'next/link' import { Collapse } from 'shared/components/collapse.mjs' import { CompleteSettingInput, @@ -169,7 +168,7 @@ export const CoreSettings = ({ const settingsConfig = loadSettingsConfig({ language, - control: account?.control, + control: account.control, sabool: settings.sabool, parts: patternConfig.draftOrder, }) diff --git a/sites/shared/components/workbench/menus/core-settings/inputs.mjs b/sites/shared/components/workbench/menus/core-settings/inputs.mjs index d224d74042e..3cb47b6a364 100644 --- a/sites/shared/components/workbench/menus/core-settings/inputs.mjs +++ b/sites/shared/components/workbench/menus/core-settings/inputs.mjs @@ -1,6 +1,5 @@ import { useState } from 'react' import { formatMm } from 'shared/utils.mjs' -import { ClearIcon } from 'shared/components/icons.mjs' import { ChoiceButton } from 'shared/components/choice-button.mjs' import orderBy from 'lodash.orderby' diff --git a/sites/shared/components/workbench/menus/design-options/index.mjs b/sites/shared/components/workbench/menus/design-options/index.mjs index 5ff641bfe05..6ead8300753 100644 --- a/sites/shared/components/workbench/menus/design-options/index.mjs +++ b/sites/shared/components/workbench/menus/design-options/index.mjs @@ -6,8 +6,7 @@ import { ModalContext } from 'shared/context/modal-context.mjs' // Components import { ModalWrapper } from 'shared/components/wrappers/modal.mjs' import { Collapse } from 'shared/components/collapse.mjs' -import { OptionsIcon, ClearIcon, HelpIcon, EditIcon, CloseIcon } from 'shared/components/icons.mjs' -import { Chevron } from 'shared/components/navigation/primary.mjs' +import { OptionsIcon, ClearIcon, HelpIcon, EditIcon } from 'shared/components/icons.mjs' import { optionsMenuStructure } from 'shared/utils.mjs' import { optionType } from 'shared/utils.mjs' import { diff --git a/sites/shared/components/workbench/menus/design-options/inputs.mjs b/sites/shared/components/workbench/menus/design-options/inputs.mjs index 840e7df07d9..a266449325c 100644 --- a/sites/shared/components/workbench/menus/design-options/inputs.mjs +++ b/sites/shared/components/workbench/menus/design-options/inputs.mjs @@ -1,6 +1,4 @@ import { useState } from 'react' -import { EditIcon } from 'shared/components/icons.mjs' -import { useTranslation } from 'next-i18next' import { formatMm, round } from 'shared/utils.mjs' import { ChoiceButton } from 'shared/components/choice-button.mjs' @@ -36,10 +34,10 @@ export const CountOptionInput = ({ name, design, config, current, update, t, ove setValue(newCurrent) update.settings(['options', name], newCurrent) } - const reset = () => { - setValue(count) - update.settings(['options', name]) - } + //const reset = () => { + // setValue(count) + // update.settings(['options', name]) + //} return ( <> @@ -72,7 +70,7 @@ export const CountOptionInput = ({ name, design, config, current, update, t, ove } export const ListOptionInput = ({ design, name, config, current, update, t }) => { - const { dflt, list, doNotTranslate = false } = config + const { dflt } = config if (typeof current === 'undefined') current = dflt const [value, setValue] = useState(current) @@ -163,10 +161,11 @@ export const PctOptionInput = ({ setValue(newCurrent) update.settings(['options', name], newCurrent / factor) } - const reset = () => { - setValue(dflt) - update.settings(['options', name]) - } + + //const reset = () => { + // setValue(dflt) + // update.settings(['options', name]) + //} return ( <> diff --git a/sites/shared/components/workbench/menus/design-options/values.mjs b/sites/shared/components/workbench/menus/design-options/values.mjs index d5470f7dec1..fa6df42f92d 100644 --- a/sites/shared/components/workbench/menus/design-options/values.mjs +++ b/sites/shared/components/workbench/menus/design-options/values.mjs @@ -6,9 +6,7 @@ export const PctOptionValue = ({ name, config, current, settings }) => { return ( {formatPercentage(val)} - {config?.toAbs && settings.measurements - ? ` | ${formatMm(config.toAbs(val, settings))}` - : null} + {config.toAbs && settings.measurements ? ` | ${formatMm(config.toAbs(val, settings))}` : null} ) } diff --git a/sites/shared/components/workbench/menus/xray/index.mjs b/sites/shared/components/workbench/menus/xray/index.mjs index a9b72e3dc73..ef9829ee774 100644 --- a/sites/shared/components/workbench/menus/xray/index.mjs +++ b/sites/shared/components/workbench/menus/xray/index.mjs @@ -1,8 +1,7 @@ import { XrayIcon, HelpIcon } from 'shared/components/icons.mjs' -import { linkClasses, Chevron } from 'shared/components/navigation/primary.mjs' -import { ConsoleLog } from './log.mjs' -import { XrayReset } from './reset.mjs' -import { XrayList } from './list.mjs' +//import { ConsoleLog } from './log.mjs' +//import { XrayReset } from './reset.mjs' +//import { XrayList } from './list.mjs' import { useTranslation } from 'next-i18next' import { Collapse } from 'shared/components/collapse.mjs' import { ChoiceButton } from 'shared/components/choice-button.mjs' diff --git a/sites/shared/components/workbench/menus/xray/path-ops.mjs b/sites/shared/components/workbench/menus/xray/path-ops.mjs index 894f446d9a1..824504745f0 100644 --- a/sites/shared/components/workbench/menus/xray/path-ops.mjs +++ b/sites/shared/components/workbench/menus/xray/path-ops.mjs @@ -2,7 +2,7 @@ //import { XrayPoint } from './point' // //const MoveLine = ({ op }) => -const Curve = ({ op }) => null +//const Curve = ({ op }) => null /* ['cp1', 'cp2', 'to'].map((pnt) => (
  • @@ -19,7 +19,7 @@ const Curve = ({ op }) => null
  • )) */ -const XrayPathOp = ({ op }) => null +//const XrayPathOp = ({ op }) => null /* * (
  • diff --git a/sites/shared/context/navigation-context.mjs b/sites/shared/context/navigation-context.mjs index 20ae3b01cfa..42b9bb0610c 100644 --- a/sites/shared/context/navigation-context.mjs +++ b/sites/shared/context/navigation-context.mjs @@ -1,4 +1,4 @@ -import React, { useState, useContext } from 'react' +import React, { useState } from 'react' import { useNavigation } from 'site/hooks/use-navigation.mjs' const defaultNavigationContext = { diff --git a/sites/shared/prebuild/org.mjs b/sites/shared/prebuild/org.mjs index 40734e6fc4b..033e766065c 100644 --- a/sites/shared/prebuild/org.mjs +++ b/sites/shared/prebuild/org.mjs @@ -63,6 +63,8 @@ export const prebuildOrg = async (site = 'org') => { ) } } + + return await Promise.all(promises) } prebuildOrg()