fix(ui): a page's sub-tab is remembered per browser tab, not forever
Settings, Configuration, Statistics and Users kept the last sub-tab in localStorage, so every fresh tab opened Configuration on "Plex" as if that were its home. useTabPersistedState keeps it in sessionStorage (account-scoped): a reload and a trip to another page keep it, a new tab starts on the first sub-tab. The pre-selects (a Review link, the Google-link return) write the same store; a value an older build left in localStorage is cleared on first read.
This commit is contained in:
@@ -48,7 +48,7 @@ vi.mock("../lib/useMe", () => ({ useMe: () => meMock }));
|
||||
vi.mock("./ui/Tabs", () => ({ default: () => null }));
|
||||
vi.mock("../lib/storage", async (importOriginal) => ({
|
||||
...(await importOriginal<typeof import("../lib/storage")>()),
|
||||
useAccountPersistedState: () => ["access", () => {}],
|
||||
useTabPersistedState: () => ["access", () => {}],
|
||||
}));
|
||||
|
||||
const pendingMock = vi.fn();
|
||||
|
||||
Reference in New Issue
Block a user