1
0
Fork 0

lint fixes

This commit is contained in:
Enoch Riese 2023-06-07 14:12:51 -05:00
parent 9109f631d3
commit 6f28c36c59
6 changed files with 37 additions and 29 deletions

View file

@ -20,7 +20,17 @@ import { EditView, ns as editNs } from './views/edit/index.mjs'
import { TestView, ns as testNs } from 'shared/components/workbench/views/test/index.mjs'
import { ExportView, ns as exportNs } from 'shared/components/workbench/views/exporting/index.mjs'
export const ns = ['account', 'workbench', ...draftNs, ...saveNs, ...printNs, ...cutNs, ...testNs]
export const ns = [
'account',
'workbench',
...draftNs,
...saveNs,
...printNs,
...cutNs,
...editNs,
...testNs,
...exportNs,
]
const defaultUi = {
renderer: 'react',

View file

@ -18,7 +18,7 @@ const UiSetting = ({ name, control, ...rest }) => (
/>
)
export const UiSettings = ({ design, update, settings, ui, control, language, DynamicDocs }) => {
export const UiSettings = ({ update, ui, control, language, DynamicDocs }) => {
const settingsConfig = loadSettingsConfig(ui)
return (

View file

@ -1,9 +1,8 @@
// Dependencies
import { forwardRef, useContext } from 'react'
import { forwardRef } from 'react'
// Hooks
import { useTranslation } from 'next-i18next'
// Context
import { ModalContext } from 'shared/context/modal-context.mjs'
// Components
import { SizeMe } from 'react-sizeme'
import { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch'
@ -32,22 +31,12 @@ export const ns = ['workbench']
* Also still to see how this will work with SSR
*/
export const PanZoomPattern = forwardRef((props, ref) => {
const { setModal } = useContext(ModalContext)
const { t } = useTranslation(ns)
const { renderProps = false, components = {}, update, settings, ui } = props
const { renderProps = false, components = {} } = props
if (!renderProps) return null
const showInfo = (evt, info = null) => {
evt.stopPropagation()
setModal(
<ModalWrapper>
<div className="max-w-prose">{info}</div>
</ModalWrapper>
)
}
return (
<SizeMe refreshRate={64}>
{({ size }) => (
@ -66,3 +55,5 @@ export const PanZoomPattern = forwardRef((props, ref) => {
</SizeMe>
)
})
PanZoomPattern.displayName = 'PanZoomPattern'