Skip to content

Commit 0f75ed8

Browse files
committed
[DEV-19082] Added new global error component for errors in layout
1 parent 11b8179 commit 0f75ed8

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed

app/global-error.tsx

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
'use client';
2+
3+
import { Error as ErrorComponent } from '@/modules/Error';
4+
5+
import 'modern-normalize/modern-normalize.css';
6+
import '@/styles/styles.globals.scss';
7+
8+
export default function Error() {
9+
return (
10+
<html>
11+
<style jsx global>{`
12+
body {
13+
box-sizing: border-box;
14+
}
15+
16+
.container {
17+
min-height: 100vh;
18+
display: flex;
19+
align-items: center;
20+
justify-content: center;
21+
font-family: Inter, sans-serif;
22+
text-align: center;
23+
}
24+
25+
.wrapper {
26+
display: flex;
27+
align-items: center;
28+
flex-direction: column;
29+
padding: 48px;
30+
gap: 36px;
31+
max-width: 900px;
32+
}
33+
34+
.title {
35+
color: #1f2937;
36+
font-weight: 700;
37+
font-size: 48px;
38+
line-height: 1.2;
39+
margin-bottom: 16px;
40+
}
41+
42+
.description {
43+
color: #4b5563;
44+
font-weight: 400;
45+
font-size: 18px;
46+
line-height: 1.6;
47+
margin: 0;
48+
}
49+
50+
.link {
51+
font-size: 18px;
52+
font-weight: 500;
53+
text-decoration: none;
54+
color: #4f46e5;
55+
outline: none;
56+
border: 0;
57+
background: none;
58+
padding: 0;
59+
}
60+
61+
.link:hover {
62+
color: #4f46e5;
63+
text-decoration: underline;
64+
cursor: pointer;
65+
}
66+
67+
.illustration {
68+
flex-shrink: 0;
69+
display: flex;
70+
align-items: center;
71+
justify-content: center;
72+
}
73+
74+
.svg {
75+
width: 400px;
76+
height: 220px;
77+
}
78+
79+
@media (max-width: 768px) {
80+
.svg {
81+
width: 245px;
82+
height: 136px;
83+
}
84+
}
85+
`}</style>
86+
<body>
87+
<ErrorComponent />
88+
</body>
89+
</html>
90+
);
91+
}

0 commit comments

Comments
 (0)