import React, { Button, Typography, Box } from '@material-ui/core'; import { useDispatch, useSelector } from 'react-redux'; import { clearSearch } from '../actions/searchActions'; const EmptyState: React.FC = () => { const dispatch = useDispatch(); const searchQuery = useSelector((state: any) => state.search.query); const handleClearSearch = () => { dispatch(clearSearch()); }; return ( No results found {searchQuery ? `We couldn't find any records matching "${searchQuery}". Try adjusting your search terms or clear the filter to see all records.` : 'There are no records to display. Clear the search to load the default list.'} ); }; export default EmptyState;