Skip to content

Commit 06af22f

Browse files
committed
fix(web): do-not-reset-list-and-item-creation-when-reading-policy
1 parent d71993d commit 06af22f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

web/src/context/SubmitItemContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const SubmitItemProvider: React.FC<{ children: React.ReactNode }> = ({ ch
5252

5353
useEffect(() => {
5454
// Cleanup function to clear local storage when user leaves the route
55-
if (location.pathname.includes("/submit-item")) return;
55+
if (location.pathname.includes("/submit-item") || location.pathname.includes("/attachment")) return;
5656

5757
resetItemData();
5858
}, [location.pathname]);

web/src/context/SubmitListContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const SubmitListProvider: React.FC<{ children: React.ReactNode }> = ({ ch
141141

142142
useEffect(() => {
143143
// Cleanup function to clear local storage when user leaves the route
144-
if (location.pathname.includes("/submit-list")) return;
144+
if (location.pathname.includes("/submit-list") || location.pathname.includes("/attachment")) return;
145145

146146
resetListData();
147147
}, [location.pathname]);

0 commit comments

Comments
 (0)