From 56054ab408f0946d72c008c58825d886a4c5cdf0 Mon Sep 17 00:00:00 2001 From: sianida26 Date: Sat, 23 Mar 2024 04:03:52 +0700 Subject: [PATCH] Rmove useEffect deps --- src/modules/dashboard/components/DashboardLayout.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/dashboard/components/DashboardLayout.tsx b/src/modules/dashboard/components/DashboardLayout.tsx index 3441486..804a11a 100644 --- a/src/modules/dashboard/components/DashboardLayout.tsx +++ b/src/modules/dashboard/components/DashboardLayout.tsx @@ -1,3 +1,4 @@ +/* eslint-disable react-hooks/exhaustive-deps */ "use client"; import React, { useEffect, useState } from "react"; import { AppShell } from "@mantine/core"; @@ -34,7 +35,7 @@ export default function DashboardLayout(props: Props) { useEffect(() => { fetchUserData() - }, [fetchUserData]) + }, []) useEffect(() => { setWithAppShell(!dashboardConfig.routesWithoutAppShell.some(v => `${dashboardConfig.baseRoute}${v}` === pathname))