Skip to content

Commit b913e37

Browse files
committed
Added Global Error Component
1 parent 17ab529 commit b913e37

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

app/error.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
"use client"
3+
4+
import { AiOutlineWarning } from "react-icons/ai"
5+
6+
const GlobalError = ({ error }: { error: Error }) => {
7+
8+
return (
9+
<div className="flex flex-col items-center justify-center h-[300px] text-center p-6 rounded-2xl bg-red-50 border border-red-200 shadow-sm">
10+
<AiOutlineWarning className="w-12 h-12 text-red-500 mb-4" />
11+
<h3 className="text-2xl font-semibold text-red-700">Something went wrong</h3>
12+
<p className="text-red-500 mt-3 max-w-md">{error.message}</p>
13+
</div>
14+
)
15+
}
16+
17+
export default GlobalError

0 commit comments

Comments
 (0)