import { ErrorView } from 'shared/components/error/view.mjs' export const DraftError = (props) => { const errors = { pattern: 0, sets: 0, } const warnings = { pattern: 0, sets: 0, } if (props.patternLogs) { errors.pattern += props.patternLogs.error.length warnings.pattern += props.patternLogs.warning.length } if (props.setLogs) { errors.sets += props.setLogs.error.length warnings.sets += props.setLogs.warning.length } const logInfo = [] if (errors.pattern > 0) logInfo.push(
  • There are {errors.pattern} errors in the pattern logs
  • ) if (errors.sets > 0) logInfo.push(
  • There are {errors.sets} errors in the draft logs
  • ) if (warnings.pattern > 0) logInfo.push(
  • There are {warnings.pattern} warnings in the pattern logs
  • ) if (warnings.sets > 0) logInfo.push(
  • There are {warnings.sets} warnings in the draft logs
  • ) const ic = ( ) return (

    No need to be alarmed, but we ran into some trouble while drafting this pattern.

    ) }