import { useState } from 'react' import SvgWrapper from './svg-wrapper' import Error from './error.js' import Popout from 'shared/components/popout.js' import Robot from 'shared/components/robot/index.js' const LabDraft = props => { const { app, draft, pattern, gist, updateGist, unsetGist, feedback } = props const [share, setShare] = useState(false) if (!draft) return null if (gist?.renderer === 'svg') { // Render as SVG let svg try { svg = draft.render() } catch(error) { console.log('Failed to render pattern', error) return } return
} // Render as React let patternProps = {} try { patternProps = draft.draft().getRenderProps() } catch(error) { console.log('Failed to get render props for pattern', error) return } // Handle broken drafts let error = null if (patternProps.events.error.length > 0) { error = (

Got {patternProps.events.error.length} problems and a stitch ain't one

Don't be alarmed, but we ran into some trouble while drafting this pattern.

Help us make FreeSewing better

If you like puzzles, you can try to figure out what went wrong:

  • Check the
  • Check the partially rendered pattern below to see which areas are problematic

Alternatively, you can escalate this. Which means that:

  • We will compile a crash report that contains everything needed to recreate this problem
  • We will include personal data such as your username, email address and measurements
  • We will share this report and the data in it with FreeSewing's bughunters team

) } console.log(patternProps) return ( <> {error} ) } export default LabDraft