Skip to content

Commit 41ecc75

Browse files
Remove loading indicator
Remove the loading indicator from the integration status check to prevent unnecessary visual feedback. The status will now be passively checked in the background.
1 parent 7a5d8de commit 41ecc75

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/IntegrationStatusIndicator.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ export const IntegrationStatusIndicator = ({ campaign }: IntegrationStatusIndica
1515
const [status, setStatus] = useState<IntegrationStatus>('checking');
1616
const [lastCheck, setLastCheck] = useState<Date>(new Date());
1717

18-
const checkIntegrationStatus = async () => {
19-
setStatus('checking');
18+
const checkIntegrationStatus = async (isInitialCheck = false) => {
19+
if (isInitialCheck) {
20+
setStatus('checking');
21+
}
2022

2123
try {
2224
// Simuler un appel API pour vérifier le statut d'intégration
@@ -53,10 +55,10 @@ export const IntegrationStatusIndicator = ({ campaign }: IntegrationStatusIndica
5355
};
5456

5557
useEffect(() => {
56-
checkIntegrationStatus();
58+
checkIntegrationStatus(true);
5759

5860
// Vérifier le statut toutes les 30 secondes
59-
const interval = setInterval(checkIntegrationStatus, 30000);
61+
const interval = setInterval(() => checkIntegrationStatus(false), 30000);
6062

6163
return () => clearInterval(interval);
6264
}, [campaign.id]);

0 commit comments

Comments
 (0)