1- import { Box , States , StatesAction , StatesActions , StatesIcon , StatesSubtitle , StatesTitle } from '@rocket.chat/fuselage' ;
1+ import { Box , PaletteStyleTag , States , StatesAction , StatesActions , StatesIcon , StatesSubtitle , StatesTitle } from '@rocket.chat/fuselage' ;
2+ import { useThemeMode } from '@rocket.chat/ui-theming' ;
23import type { ErrorInfo , ReactElement } from 'react' ;
34
45type AppErrorPageProps = {
@@ -8,30 +9,35 @@ type AppErrorPageProps = {
89} ;
910
1011const AppErrorPage = ( _props : AppErrorPageProps ) : ReactElement => {
12+ const [ , , theme ] = useThemeMode ( ) ;
13+
1114 return (
12- < Box display = 'flex' justifyContent = 'center' height = 'full' backgroundColor = 'surface' >
13- < States >
14- < StatesIcon name = 'error-circle' />
15- < StatesTitle > Application Error</ StatesTitle >
16- < StatesSubtitle > The application GUI just crashed.</ StatesSubtitle >
15+ < >
16+ < PaletteStyleTag theme = { theme } tagId = 'app-error-palette' />
17+ < Box display = 'flex' justifyContent = 'center' height = 'full' backgroundColor = 'surface' >
18+ < States >
19+ < StatesIcon name = 'error-circle' />
20+ < StatesTitle > Application Error</ StatesTitle >
21+ < StatesSubtitle > The application GUI just crashed.</ StatesSubtitle >
1722
18- < StatesActions >
19- < StatesAction
20- onClick = { ( ) => {
21- const result = indexedDB . deleteDatabase ( 'MeteorDynamicImportCache' ) ;
22- result . onsuccess = ( ) => {
23- window . location . reload ( ) ;
24- } ;
25- result . onerror = ( ) => {
26- window . location . reload ( ) ;
27- } ;
28- } }
29- >
30- Reload Application
31- </ StatesAction >
32- </ StatesActions >
33- </ States >
34- </ Box >
23+ < StatesActions >
24+ < StatesAction
25+ onClick = { ( ) => {
26+ const result = indexedDB . deleteDatabase ( 'MeteorDynamicImportCache' ) ;
27+ result . onsuccess = ( ) => {
28+ window . location . reload ( ) ;
29+ } ;
30+ result . onerror = ( ) => {
31+ window . location . reload ( ) ;
32+ } ;
33+ } }
34+ >
35+ Reload Application
36+ </ StatesAction >
37+ </ StatesActions >
38+ </ States >
39+ </ Box >
40+ </ >
3541 ) ;
3642} ;
3743
0 commit comments