Skip to content

Commit 3572de4

Browse files
committed
fix setLocalStorageItemReactive
1 parent 5332970 commit 3572de4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/e2ee/sharedKeyManagement.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ Please see LICENSE in the repository root for full details.
77

88
import { useEffect, useMemo } from "react";
99

10-
import { setLocalStorageItem, useLocalStorage } from "../useLocalStorage";
10+
import {
11+
setLocalStorageItemReactive,
12+
useLocalStorage,
13+
} from "../useLocalStorage";
1114
import { type UrlParams, getUrlParams, useUrlParams } from "../UrlParams";
1215
import { E2eeType } from "./e2eeType";
1316
import { useClient } from "../ClientContext";
1417

1518
export function saveKeyForRoom(roomId: string, password: string): void {
16-
setLocalStorageItem(getRoomSharedKeyLocalStorageKey(roomId), password);
19+
setLocalStorageItemReactive(
20+
getRoomSharedKeyLocalStorageKey(roomId),
21+
password,
22+
);
1723
}
1824

1925
const getRoomSharedKeyLocalStorageKey = (roomId: string): string =>

0 commit comments

Comments
 (0)