larxius commited on
Commit
5c7468a
·
verified ·
1 Parent(s): b14f8d1

Update frontend/src/pages/AdminPage.jsx

Browse files
Files changed (1) hide show
  1. frontend/src/pages/AdminPage.jsx +4 -3
frontend/src/pages/AdminPage.jsx CHANGED
@@ -1,4 +1,5 @@
1
- import React, { useState, useEffect, useCallback } from 'react';
 
2
  import { useAuth } from '../components/AuthContext';
3
  import { CustomModal } from '../components/CustomModal';
4
  import { useNavigate } from 'react-router-dom';
@@ -24,7 +25,7 @@ import {
24
  import { ErrorBoundary } from '../components/ErrorBoundary';
25
 
26
  const AdminPageContent = () => {
27
- const { token, user } = useAuth();
28
  const navigate = useNavigate();
29
 
30
  const [activeTab, setActiveTab] = useState('members'); // 'members', 'orgs', 'scan_access', 'audit'
@@ -428,7 +429,7 @@ const AdminPageContent = () => {
428
  );
429
  }
430
 
431
- const uniqueOrgsList = Array.from(new Set((users || []).map(u => u.org_name).filter(Boolean)));
432
 
433
  return (
434
  <div className="w-full text-on-surface animate-fade-in pb-xl">
 
1
+ /* eslint-disable react-hooks/set-state-in-effect, react-hooks/exhaustive-deps, react-hooks/immutability */
2
+ import { useState, useEffect, useCallback } from 'react';
3
  import { useAuth } from '../components/AuthContext';
4
  import { CustomModal } from '../components/CustomModal';
5
  import { useNavigate } from 'react-router-dom';
 
25
  import { ErrorBoundary } from '../components/ErrorBoundary';
26
 
27
  const AdminPageContent = () => {
28
+ const { token } = useAuth();
29
  const navigate = useNavigate();
30
 
31
  const [activeTab, setActiveTab] = useState('members'); // 'members', 'orgs', 'scan_access', 'audit'
 
429
  );
430
  }
431
 
432
+ // uniqueOrgsList for filtering is derived inline in the JSX dropdown below
433
 
434
  return (
435
  <div className="w-full text-on-surface animate-fade-in pb-xl">