Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit 934703e

Browse files
author
Manuel Proß
committed
feat(web): add redirect instead of console.log (due to linting)
1 parent 1a0868b commit 934703e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

web/src/app/layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import "../styles/globals.scss";
55
import qs from "qs";
66
import Layout from "@/components/Layout/Layout";
77
import SessionProvider from "./../components/SessionProvider";
8+
import { redirect } from "next/navigation";
89

910
const params = {
1011
nested: true,
@@ -35,7 +36,6 @@ async function getPageProps() {
3536
const data = await response.json();
3637
return data.data.attributes.items.data;
3738
} catch (error) {
38-
console.error("Error fetching page props:", error);
3939
return [];
4040
}
4141
}
@@ -48,13 +48,13 @@ export default async function RootLayout({ children }: { children: React.ReactNo
4848
const props = await getPageProps();
4949
pageProps.push(...props);
5050
} catch (error) {
51-
console.error("Error fetching page properties:", error);
51+
redirect("/error/500");
5252
}
5353

5454
try {
5555
session = await getServerSession();
5656
} catch (error) {
57-
console.error("Error fetching server session:", error);
57+
redirect("/error/500");
5858
}
5959

6060
return (

0 commit comments

Comments
 (0)