More robust error handling & Display errors to user

This commit is contained in:
Koper
2023-08-31 19:11:22 +07:00
parent df078f7bd6
commit 11bd568a6b
7 changed files with 139 additions and 41 deletions

View File

@@ -3,6 +3,8 @@ import { Roboto } from "next/font/google";
import { Metadata } from "next";
import FiefWrapper from "./(auth)/fiefWrapper";
import UserInfo from "./(auth)/userInfo";
import { ErrorProvider } from "./(errors)/errorContext";
import ErrorMessage from "./(errors)/errorMessage";
const roboto = Roboto({ subsets: ["latin"], weight: "400" });
@@ -55,19 +57,24 @@ export default function RootLayout({ children }) {
<html lang="en">
<body className={roboto.className + " flex flex-col min-h-screen"}>
<FiefWrapper>
<div id="container">
<div className="flex flex-col items-center h-[100svh] bg-gradient-to-r from-[#8ec5fc30] to-[#e0c3fc42]">
<UserInfo />
<ErrorProvider>
<ErrorMessage />
<div id="container">
<div className="flex flex-col items-center h-[100svh] bg-gradient-to-r from-[#8ec5fc30] to-[#e0c3fc42]">
<UserInfo />
<div className="h-[13svh] flex flex-col justify-center items-center">
<h1 className="text-5xl font-bold text-blue-500">Reflector</h1>
<p className="text-gray-500">
Capture The Signal, Not The Noise
</p>
<div className="h-[13svh] flex flex-col justify-center items-center">
<h1 className="text-5xl font-bold text-blue-500">
Reflector
</h1>
<p className="text-gray-500">
Capture The Signal, Not The Noise
</p>
</div>
{children}
</div>
{children}
</div>
</div>
</ErrorProvider>
</FiefWrapper>
</body>
</html>