22
33import React , { Suspense , useEffect , useState } from "react" ;
44import { unstable_catchError as catchError , type ErrorInfo } from 'next/error' ;
5- import Background from "@components/background/background" ;
5+ //import Background from "@components/background/background";
6+ import WebGlBackground from "@components/background/webGlBackground" ;
67import Clock from "@components/clock/Clock" ;
78//import dynamic from "next/dynamic";
89import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" ;
@@ -70,10 +71,10 @@ export default function ErrorPage({
7071 return (
7172 < div className = "root-container" >
7273 < Suspense >
73- < Background />
74+ < WebGlBackground />
7475 < Clock />
7576 </ Suspense >
76- < div className = "grid content-center z-100 overflow-hidden absolute left-0 top-0 w-full h-screen text-white" >
77+ < div className = "grid content-center z-100 w-full h-full text-white" >
7778 { error && (
7879 < >
7980 < button
@@ -82,41 +83,51 @@ export default function ErrorPage({
8283 ( ) => unstable_retry ( )
8384 }
8485 aria-label = "Return to the home page" >
85- < div className = "flex flex-row justify-center items-center text-4xl hover:animate-pulse gap-4" >
86- < FontAwesomeIcon icon = { faBug } className = "object-contain justify-self-center" />
87- < span className = "text-center" >
88- { error . name }
89- </ span >
90- </ div >
91- < hr className = "w-[80%] md:w-[60%] mx-auto my-1 md:my-5 border-gray-500 opacity-50" />
92- < div className = "flex flex-row justify-center items-center text-2xl select-all" >
93- < p > { error . message } </ p >
94- </ div >
95- { stackTrace && (
96- < div className = "m-5" >
97- < hr className = "w-[80%] md:w-[60%] mx-auto my-1 md:my-5 border-gray-500 opacity-50" />
98- < div className = "text-xl text-left m-2" >
99- Stacktrace:
86+ < div className = "flex flex-col mt-[30%]" >
87+ < div className = "grid grid-cols-2 text-center text-lg lg:text-4xl hover:animate-pulse gap-1 lg:gap-4 px-auto" >
88+ < FontAwesomeIcon icon = { faBug } className = "" />
89+ < div className = "text-center" >
90+ { error . name }
10091 </ div >
101- < div className = "grid w-full overflow-scroll mx-auto max-h-[60%]" >
102- { stackTrace . map ( ( line ) => {
103- return (
104- < >
105- < tr className = "flex" key = { line . id } >
106- < td className = "text-center opacity-50 inline-block w-8" > { line . id } </ td >
107- < td className = "text-right select-all overflow-clip text-ellipsis text-nowrap max-w-[80%] mx-2"
108- dir = "rtl"
109- title = { line . line } >
110- { line . file }
111- </ td >
112- < td className = "text-left select-all inline-block w-8" > { line . lineNo } </ td >
92+ </ div >
93+ < hr className = "w-[80%] md:w-[60%] mx-auto my-1 md:my-5 border-gray-500 opacity-50" />
94+ < div className = "grid text-center lg:text-2xl select-all" >
95+ < p > { error . message } </ p >
96+ </ div >
97+ { stackTrace && (
98+ < div className = "m-5" >
99+ < hr className = "w-[80%] md:w-[60%] mx-auto my-1 md:my-5 border-gray-500 opacity-50" />
100+ < div className = "text-xl text-left m-2" >
101+ Stacktrace:
102+ </ div >
103+ < div className = "grid w-full mx-auto" >
104+ < table className = "table-auto border border-collapse" >
105+ < thead >
106+ < tr >
107+ < th className = "border border-gray-400/25" > </ th >
108+ < th className = "border border-gray-400/25" > File</ th >
109+ < th className = "border border-gray-400/25" > Line</ th >
113110 </ tr >
114- </ >
115- ) ;
116- } ) }
111+ </ thead >
112+ < tbody >
113+ { stackTrace . map ( ( line ) => {
114+ return (
115+ < tr key = { line . id } >
116+ < td className = "text-center opacity-50 inline-block w-8" > { line . id } </ td >
117+ < td className = "text-left select-all overflow-clip text-ellipsis text-nowrap mx-2"
118+ title = { line . line } >
119+ { line . file }
120+ </ td >
121+ < td className = "text-left select-all inline-block" > { line . lineNo } </ td >
122+ </ tr >
123+ ) ;
124+ } ) }
125+ </ tbody >
126+ </ table >
127+ </ div >
117128 </ div >
118- </ div >
119- ) }
129+ ) }
130+ </ div >
120131 </ button >
121132 </ >
122133 ) }
0 commit comments