import { CopyIcon } from '@chakra-ui/icons' import { Box, Button, Flex, IconButton, Text } from '@chakra-ui/react' import Image from 'next/image' import { useCallback } from 'react' import { copyText } from '../CopyItem' import * as Sentry from '@sentry/react' import { Logo } from '../../../constants/icons' export default function ErrorBoundary({ children }) { const handleOnClick = useCallback(() => window.location.reload(), []) return ( { scope.setLevel('fatal') }} fallback={({ eventId }) => { return ( logo Oops, something wrong. {eventId && ( Error Tracking Id {eventId} copyText(eventId)}> )} ) }} > {children} ) }