Skip to content

Commit d9f285c

Browse files
committed
Remove cross-tab localStorage synchronization
1 parent 8859f39 commit d9f285c

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

gui/src/context/LocalStorage.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,6 @@ export const LocalStorageProvider: React.FC<{ children: React.ReactNode }> = ({
3434
syncWithLocalStorage();
3535
}, []);
3636

37-
// Listen for localStorage changes from other tabs
38-
useEffect(() => {
39-
const handleStorageChange = (event: StorageEvent) => {
40-
if (event.key === "fontSize") {
41-
syncWithLocalStorage();
42-
}
43-
};
44-
45-
window.addEventListener("storage", handleStorageChange);
46-
47-
return () => {
48-
window.removeEventListener("storage", handleStorageChange);
49-
};
50-
}, []);
51-
5237
// Listen for current tab changes using CustomEvent
5338
useEffect(() => {
5439
const handleLocalStorageChange = (event: CustomEvent) => {

0 commit comments

Comments
 (0)