mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-05 04:02:21 +02:00
Error handling
This commit is contained in:
parent
bb46740463
commit
bd8029774e
1 changed files with 8 additions and 1 deletions
|
@ -6,6 +6,7 @@ import { Toaster } from "@rallly/ui/toaster";
|
||||||
import type { Viewport } from "next";
|
import type { Viewport } from "next";
|
||||||
import dynamic from "next/dynamic";
|
import dynamic from "next/dynamic";
|
||||||
import { Inter } from "next/font/google";
|
import { Inter } from "next/font/google";
|
||||||
|
import type { Session } from "next-auth";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import { TimeZoneChangeDetector } from "@/app/[locale]/timezone-change-detector";
|
import { TimeZoneChangeDetector } from "@/app/[locale]/timezone-change-detector";
|
||||||
|
@ -36,7 +37,13 @@ export default async function Root({
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
params: { locale: string };
|
params: { locale: string };
|
||||||
}) {
|
}) {
|
||||||
const session = await getServerSession();
|
let session: Session | null = null;
|
||||||
|
try {
|
||||||
|
session = await getServerSession();
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html lang={locale} className={inter.className}>
|
<html lang={locale} className={inter.className}>
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue