fix eslint config
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import "@/styles/globals.css";
|
||||
|
||||
import Header from "@/components/Header";
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
import Footer from "@/components/Footer";
|
||||
import Header from "@/components/Header";
|
||||
import AuthModal from "@/components/auth/AuthModal";
|
||||
|
||||
import ContextProvider from "@/context/ContextProvider";
|
||||
@@ -34,7 +36,7 @@ export const metadata = {
|
||||
metadataBase: new URL(process.env.VERCEL ? "https://ches.su" : "http://localhost:3000")
|
||||
};
|
||||
|
||||
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html lang="en" className="overflow-x-hidden">
|
||||
<body className="overflow-x-hidden">
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
"use client";
|
||||
|
||||
import type { User } from "@chessu/types";
|
||||
import type { ReactNode } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { fetchSession } from "@/lib/auth";
|
||||
import { SessionContext } from "./session";
|
||||
|
||||
export default function ContextProvider({ children }: { children: React.ReactNode }) {
|
||||
export default function ContextProvider({ children }: { children: ReactNode }) {
|
||||
const [user, setUser] = useState<User | null>({});
|
||||
|
||||
async function getSession() {
|
||||
|
||||
@@ -11,7 +11,9 @@ export const fetchSession = async () => {
|
||||
const user: User = await res.json();
|
||||
return user;
|
||||
}
|
||||
} catch (err) {}
|
||||
} catch (err) {
|
||||
// do nothing
|
||||
}
|
||||
};
|
||||
|
||||
export const setGuestSession = async (name: string) => {
|
||||
|
||||
Reference in New Issue
Block a user