import { observer } from 'mobx-react-lite'; import React from 'react'; import { useStore } from 'App/mstore'; import { Loader, NoContent } from 'UI'; import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG'; import MainSection from './MainSection'; import SideSection from './SideSection'; function ErrorInfo(props) { const { errorStore } = useStore(); const instance = errorStore.instance; const ensureInstance = () => { if (errorStore.isLoading) return; errorStore.fetchError(props.errorId); errorStore.fetchErrorTrace(props.errorId); }; React.useEffect(() => { ensureInstance(); }, [props.errorId]); const errorIdInStore = errorStore.instance?.errorId; const loading = errorStore.isLoading; return (
No Error Found!
} subtext="Please try to find existing one." show={!loading && errorIdInStore == null} >
); } export default observer(ErrorInfo);