1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-14 00:19:16 +01:00

fix: reduce integration events requests (#8055)

Cuts the total amount of integration event requests in half when
browsing the integrations page, by only fetching the 20 latest events
for each configured integration when it's actually needed (open modal).
This commit is contained in:
Nuno Góis 2024-09-03 12:29:33 +01:00 committed by GitHub
parent b350bd11a7
commit c865fd4fbb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,7 +65,7 @@ export const IntegrationEventsModal = ({
const navigate = useNavigate();
const { locationSettings } = useLocationSettings();
const { integrationEvents, hasMore, loadMore, loading } =
useIntegrationEvents(addon?.id, 20, {
useIntegrationEvents(open ? addon?.id : undefined, 20, {
refreshInterval: 5000,
});