import { useEffect } from 'react' import { useTranslation } from 'next-i18next' import Settings from './settings' import Draft from '../draft' import pluginBuilder from './plugin' const addPages = (gist) => { const pages = [] } 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( props.gist?._state?.layout?.forPrinting?.page?.size, props.gist?._state?.layout?.forPrinting?.page?.orientation, )) let patternProps try { draft.draft() patternProps = draft.getRenderProps() } catch(err) { console.log(err) } const bgProps = { fill: "url(#page)" } return (

{ t('layoutThing', { thing: props.pattern.config.name }) + ': ' + t('forPrinting') }

) } export default PrintLayout