UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) 516 B
import{jsx as o}from"react/jsx-runtime";import{captureException as s}from"@sentry/react";import a from"react";class p{hasError;constructor(r){this.hasError=r}}export default class n extends a.Component{constructor(r){super(r),this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0}}componentDidCatch(r,e){s(r,{contexts:{react:{componentStack:e.componentStack}}})}render(){return this.state.hasError?o("h4",{style:{textAlign:"center"},children:"Not available offline."}):this.props.children}}