📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
redesigned the crash page
Blue Mouseff65b28d8c18
diff --git a/src/pages/CrashHandler/index.js b/src/pages/CrashHandler/index.jsindex af067aca2..5b66d5493 100644--- a/src/pages/CrashHandler/index.js+++ b/src/pages/CrashHandler/index.js@@ -1,5 +1,6 @@import React from 'react'import _toString from 'lodash/toString'+import { ExclamationIcon, ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/outline'import { CONTACT_EMAIL } from 'redux/constants'class CrashHandler extends React.Component {@@ -9,6 +10,7 @@ class CrashHandler extends React.Component {appCrashed: false,crashStack: '',errorMessage: '',+ crashStackShown: false,}}@@ -20,35 +22,61 @@ class CrashHandler extends React.Component {}}+ onCrashStackClick = () => {+ this.setState((prevState) => ({+ crashStackShown: !prevState.crashStackShown,+ }))+ }+render() {- const { appCrashed, crashStack, errorMessage } = this.state+ const {+ appCrashed, crashStack, errorMessage, crashStackShown,+ } = this.stateconst { children } = this.propsif (appCrashed) {return (- <div>- <b>- The app crashed, sorry about that.. :(- <br />- Please, tell us about it at- - {CONTACT_EMAIL}- <br />- To continue using the website, please reload the page.- </b>-- <br />- <br />-- <p>- Technical crash information:- <br />- <i>- {errorMessage}- <br />- {crashStack}- </i>- </p>+ // Using style because for some reason min-h-screen doesn't work+ <div style={{ minHeight: '100vh' }} className='pt-16 pb-12 flex flex-col bg-gray-50 dark:bg-gray-800'>+ <div className='flex-grow flex flex-col justify-center max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8'>+ <div className='flex-shrink-0 flex justify-center'>+ <ExclamationIcon className='h-24 w-auto text-yellow-400 dark:text-yellow-600' />+ </div>+ <div className='py-8'>+ <div className='text-center'>+ <h1 className='text-4xl font-extrabold text-gray-900 dark:text-gray-50 tracking-tight sm:text-5xl'>Uh-oh..</h1>+ <p className='mt-2 text-base font-medium text-gray-800 dark:text-gray-300'>+ The app has crashed. We are sorry about that :(+ <br />+ Please, tell us about it at+ {' '}+ {CONTACT_EMAIL}+ </p>+ <p className='mt-6 text-base font-medium text-gray-800 dark:text-gray-300'>+ {errorMessage}+ <br />+ <span onClick={this.onCrashStackClick} className='flex justify-center items-center text-base text-gray-800 dark:text-gray-300 cursor-pointer hover:underline'>+ {crashStackShown ? (+ <>+ Hide crash stack+ <ChevronUpIcon className='w-4 h-4 ml-2' />+ </>+ ) : (+ <>+ Show crash stack+ <ChevronDownIcon className='w-4 h-4 ml-2' />+ </>+ )}+ </span>+ {crashStackShown && (+ <span className='text-sm text-gray-600 dark:text-gray-400 whitespace-pre-line'>+ {crashStack}+ </span>+ )}+ </p>+ </div>+ </div>+ </div></div>)}