fix(notifications): Review link opens the Access requests tab, not the last-used one

The access-requests notice's Review link navigated to the Users page but the
persisted tab (often Demo) loaded instead. Pre-select the access tab before
navigating (focusAccessRequestsTab writes the persisted-tab key, which the page
reads on its fresh mount).
This commit is contained in:
npeter83 2026-06-26 01:05:14 +02:00
parent 6286dcc3c2
commit 04d3367c88
3 changed files with 24 additions and 4 deletions

View file

@ -32,7 +32,7 @@ import Playlists from "./components/Playlists";
import Stats from "./components/Stats";
import Scheduler from "./components/Scheduler";
import ConfigPanel from "./components/ConfigPanel";
import AdminUsers from "./components/AdminUsers";
import AdminUsers, { focusAccessRequestsTab } from "./components/AdminUsers";
import SettingsPanel from "./components/SettingsPanel";
import NotificationsPanel from "./components/NotificationsPanel";
import Messages from "./components/Messages";
@ -372,7 +372,13 @@ export default function App() {
// Durable inbox link (survives reload, unlike a live action callback); the toast also
// gets a click via the action.
meta: { kind: "access-requests" },
action: { label: t("common.accessRequestsReview"), onClick: () => setPage("users") },
action: {
label: t("common.accessRequestsReview"),
onClick: () => {
focusAccessRequestsTab();
setPage("users");
},
},
});
}
}