From a853194751f2709477f720d6c421f68ff699eb80 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 12 Sep 2025 11:13:59 -0600 Subject: [PATCH] fix: remove uneccessary memoization --- gui/src/components/Layout.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 7a56d5a1b..8045b72c8 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -1,5 +1,5 @@ import { OnboardingModes } from "core/protocol/core"; -import { useContext, useEffect, useMemo, useState } from "react"; +import { useContext, useEffect, useState } from "react"; import { Outlet, useLocation, useNavigate } from "react-router-dom"; import styled from "styled-components"; import { CustomScrollbarDiv } from "."; @@ -54,12 +54,9 @@ const Layout = () => { const showDialog = useAppSelector((state) => state.ui.showDialog); const isInEdit = useAppSelector((store) => store.session.isInEdit); - const isHome = useMemo(() => { - return ( - location.pathname === ROUTES.HOME || - location.pathname === ROUTES.HOME_INDEX - ); - }, [location]); + const isHome = + location.pathname === ROUTES.HOME || + location.pathname === ROUTES.HOME_INDEX; useEffect(() => { (async () => {