1
0
Fork 0

chore: Linter issues

This commit is contained in:
Joost De Cock 2023-08-29 09:39:48 +02:00
parent 30b60bf569
commit 9741a6e736
4 changed files with 27 additions and 40 deletions

View file

@ -11,7 +11,6 @@ import {
formatMm,
hasRequiredMeasurements,
capitalize,
scrollTo,
horFlexClasses,
} from 'shared/utils.mjs'
import orderBy from 'lodash.orderby'
@ -26,7 +25,7 @@ import { ModalContext } from 'shared/context/modal-context.mjs'
import { Popout } from 'shared/components/popout/index.mjs'
import { Tag } from 'shared/components/tag.mjs'
import { BackToAccountButton } from './shared.mjs'
import { AnchorLink, PageLink, Link, linkClasses } from 'shared/components/link.mjs'
import { AnchorLink, PageLink, Link } from 'shared/components/link.mjs'
import { V3Wip } from 'shared/components/v3-wip.mjs'
import {
OkIcon,
@ -117,8 +116,6 @@ export const MsetCard = ({
language = false,
size = 'lg',
}) => {
const { t } = useTranslation(ns)
const sizes = {
lg: 96,
md: 52,

View file

@ -425,14 +425,9 @@ export const MarkdownInput = ({
id = '', // An id to tie the input to the label
labelBL = false, // Bottom-Left label
labelBR = false, // Bottom-Right label
}) => {
const [activeTab, setActiveTab] = useState('edit')
const tabs = ['edit', 'preview']
return (
}) => (
<FormControl {...{ label, labelBL, labelBR, docs }} forId={id}>
<Tabs tabs={tabs}>
<Tabs tabs={['edit', 'preview']}>
<Tab key="edit">
<div className="flex flex-row items-center mt-4">
<textarea
@ -453,7 +448,6 @@ export const MarkdownInput = ({
</Tabs>
</FormControl>
)
}
export const MeasieInput = ({
imperial, // True for imperial, False for metric

View file

@ -6,7 +6,7 @@ import { DynamicOrgDocs } from 'shared/components/dynamic-docs/org.mjs'
export const ns = nsMerge('workbench', inputNs)
export const MeasiesEditor = ({ Design, settings, update }) => {
const { t, i18n } = useTranslation(ns)
const { i18n } = useTranslation(ns)
const onUpdate = (m, newVal) => {
update.settings(['measurements', m], newVal)

View file

@ -13,10 +13,8 @@ import {
CuratedSetPicker,
ns as setsNs,
} from 'shared/components/account/sets.mjs'
import { Tabs, Tab } from 'shared/components/tabs.mjs'
import { MeasiesEditor } from './editor.mjs'
import { Popout } from 'shared/components/popout/index.mjs'
import { linkClasses } from 'shared/components/link.mjs'
import { Accordion } from 'shared/components/accordion.mjs'
import { MsetIcon, BookmarkIcon, CsetIcon, EditIcon } from 'shared/components/icons.mjs'
@ -28,8 +26,6 @@ export const MeasiesView = ({ design, Design, settings, update, missingMeasureme
const { t } = useTranslation(['workbench'])
const { setLoadingStatus, LoadingStatus } = useLoadingStatus()
const tabs = tabNames.map((n) => t(n)).join(',')
const loadMeasurements = (set) => {
update.settings([
[['measurements'], designMeasurements(Design, set.measies)],
@ -97,7 +93,7 @@ export const MeasiesView = ({ design, Design, settings, update, missingMeasureme
</div>
<p>{t('workbench:chooseFromCuratedSetsDesc')}</p>
</Fragment>,
<CuratedSetPicker design={design} clickHandler={loadMeasurements} t={t} />,
<CuratedSetPicker design={design} clickHandler={loadMeasurements} t={t} key={2} />,
],
[
<Fragment key={1}>
@ -107,7 +103,7 @@ export const MeasiesView = ({ design, Design, settings, update, missingMeasureme
</div>
<p>{t('workbench:editMeasiesByHandDesc')}</p>
</Fragment>,
<MeasiesEditor {...{ Design, settings, update }} />,
<MeasiesEditor {...{ Design, settings, update }} key={2} />,
],
]}
/>