forked from baron/baron-sso
fix(adminfront): fix ReferenceErrors and null checks in UI components
- Import and initialize 'navigate' in TenantUsersPage and TenantAdminsAndOwnersTab. - Use optional chaining for 'user.id' in UserDetailPage to prevent runtime errors during initial load.
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
UserMinus,
|
||||
UserPlus,
|
||||
} from "lucide-react";
|
||||
import { Link, useParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useParams } from "react-router-dom";
|
||||
import { Badge } from "../../../components/ui/badge";
|
||||
import { Button } from "../../../components/ui/button";
|
||||
import {
|
||||
@@ -38,6 +38,7 @@ import { t } from "../../../lib/i18n";
|
||||
|
||||
function TenantUsersPage() {
|
||||
const params = useParams<{ tenantId: string }>();
|
||||
const navigate = useNavigate();
|
||||
const tenantId = params.tenantId ?? "";
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user