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

@ -4,6 +4,7 @@ import { useMutation, useQueryClient } from "@tanstack/react-query";
import { Activity, Bell, Check, CheckCheck, ExternalLink, Eye, RotateCcw, Search, Trash2, Tv, UserPlus, X } from "lucide-react";
import { api, type AppNotification, type FeedFilters } from "../lib/api";
import { useLiveQuery } from "../lib/useLiveQuery";
import { focusAccessRequestsTab } from "./AdminUsers";
import {
clearAll as clearClient,
dismiss as dismissClient,
@ -190,7 +191,10 @@ export default function NotificationsPanel({
onFind={locate}
onRevert={revertState}
onFocusChannel={onFocusChannel}
onReviewAccess={() => setPage("users")}
onReviewAccess={() => {
focusAccessRequestsTab();
setPage("users");
}}
onRemove={() => removeClient(n.id)}
/>
))}