- setIsSideNavOpen(!isSideNavOpen)} />
+ {router.pathname !== '/' && (
+ setIsSideNavOpen(!isSideNavOpen)} />
+ )}
+ {router.pathname !== '/' && (
+
+
+
+ )}
-
-
-
{props.children}
From 61acb7ff4aaa1599e9216db5fd4c5afed034c382 Mon Sep 17 00:00:00 2001
From: TkymHrt <23.h.takayama.nutfes@gmail.com>
Date: Tue, 13 Jan 2026 00:32:49 +0900
Subject: [PATCH 4/9] refactor: migrate state management from Recoil to Zustand
across multiple components
---
.../src/components/common/ChakraUIDropdown.tsx | 5 ++---
.../create_purchase_report/usePurchaseReportForm.ts | 9 ++++-----
.../src/components/purchasereports/DetailPage1.tsx | 7 +++----
.../src/components/purchasereports/EditModal.tsx | 5 ++---
.../purchasereports/PurchaseReportAddModal.tsx | 5 ++---
.../purchasereports/PurchaseReportItemNumModal.tsx | 9 ++++-----
.../next-project/src/components/yearperiods/AddModal.tsx | 7 +++----
view/next-project/src/pages/budget_managements/index.tsx | 5 ++---
view/next-project/src/pages/fund_informations/index.tsx | 7 +++----
view/next-project/src/pages/my_page/index.tsx | 5 ++---
.../src/pages/purchase_report_list/index.tsx | 9 ++++-----
view/next-project/src/pages/teachers/index.tsx | 7 +++----
view/next-project/src/pages/users/index.tsx | 7 +++----
view/next-project/src/pages/yearperiods/index.tsx | 9 ++++-----
14 files changed, 41 insertions(+), 55 deletions(-)
diff --git a/view/next-project/src/components/common/ChakraUIDropdown.tsx b/view/next-project/src/components/common/ChakraUIDropdown.tsx
index 089ca9f22..4357225f0 100644
--- a/view/next-project/src/components/common/ChakraUIDropdown.tsx
+++ b/view/next-project/src/components/common/ChakraUIDropdown.tsx
@@ -1,9 +1,8 @@
import { Button, Menu, MenuButton, MenuItem, MenuList } from '@chakra-ui/react';
import React from 'react';
import { RiArrowDropDownLine } from 'react-icons/ri';
-import { useRecoilValue } from 'recoil';
-import { userAtom } from '@/store/atoms';
+import { useUserStore } from '@/store';
interface Props {
title: string;
@@ -12,7 +11,7 @@ interface Props {
}
const Dropdown = (props: Props) => {
- const user = useRecoilValue(userAtom);
+ const user = useUserStore((state) => state.user);
return (