import React, { useState, useEffect } from 'react'; import { IconAlertTriangle } from '@tabler/icons'; const RequestTabNotFound = ({handleCloseClick}) => { const [showErrorMessage, setShowErrorMessage] = useState(false); // add a delay component in react that shows a loading spinner // and then shows the error message after a delay // this will prevent the error message from flashing on the screen useEffect(() => { setTimeout(() => { setShowErrorMessage(true); }, 300); }, []); if(!showErrorMessage) { return null; } return ( <>