chore(workbench): move xray to _state in gist
This commit is contained in:
parent
7e5e3b2665
commit
99232fe020
10 changed files with 50 additions and 36 deletions
|
@ -1,3 +1,4 @@
|
|||
import { useEffect } from 'react'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import Settings from './settings'
|
||||
import Draft from '../draft'
|
||||
|
@ -9,6 +10,14 @@ const addPages = (gist) => {
|
|||
|
||||
|
||||
const PrintLayout = props => {
|
||||
|
||||
useEffect(() => {
|
||||
if (props.gist?._state?.xray?.enabled) props.updateGist(
|
||||
['_state', 'xray', 'enabled'],
|
||||
false
|
||||
)
|
||||
}, [])
|
||||
|
||||
const { t } = useTranslation(['workbench'])
|
||||
|
||||
const draft = new props.pattern(props.gist).use(pluginBuilder(
|
||||
|
|
|
@ -12,7 +12,7 @@ const PrintLayoutSettings = props => {
|
|||
<div className="flex flex-row gap-4 justify-center">
|
||||
<PageSizePicker {...props} />
|
||||
<OrientationPicker {...props} />
|
||||
<pre>{JSON.stringify(props.gist._state, null ,2)}</pre>
|
||||
<pre>{JSON.stringify(props.gist, null ,2)}</pre>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue