()
| 42 | // Fetch publishers data for this organization |
| 43 | useEffect(() => { |
| 44 | const fetchPublishers = async () => { |
| 45 | if (!organization?.id) return |
| 46 | |
| 47 | setPublishersLoading(true) |
| 48 | try { |
| 49 | const response = await fetch(`/api/orgs/${organization.id}/publishers`) |
| 50 | if (response.ok) { |
| 51 | const data = await response.json() |
| 52 | setPublishers(data.publishers || []) |
| 53 | } |
| 54 | } catch (error) { |
| 55 | console.error('Error fetching publishers:', error) |
| 56 | } finally { |
| 57 | setPublishersLoading(false) |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | fetchPublishers() |
| 62 | }, [organization?.id]) |
no test coverage detected