Remove interval fetching

This commit is contained in:
Nicolas Meienberger 2022-05-13 18:26:03 +02:00
parent a424c9ebc1
commit 07881c57a1

View file

@ -1,5 +1,5 @@
import { SlideFade, Image, VStack, Flex, Divider, useDisclosure, useToast } from '@chakra-ui/react';
import React, { useEffect } from 'react';
import React from 'react';
import { FiExternalLink } from 'react-icons/fi';
import { AppConfig } from '../../../core/types';
import { useAppsStore } from '../../../state/appsStore';
@ -22,14 +22,6 @@ const AppDetails: React.FC<IProps> = ({ app }) => {
const { install, update, uninstall, stop, start, fetchApp } = useAppsStore();
useEffect(() => {
const interval = setInterval(() => {
fetchApp(app.id);
}, 3000);
return () => clearInterval(interval);
}, [app.id, fetchApp]);
const handleError = (error: unknown) => {
if (error instanceof Error) {
toast({