import React, { useEffect, useRef } from 'react'; import { useSearchUIContext, useSearchUIContextActions } from '../SearchUIContextProvider'; import { searchUIViewsMap } from '../types'; import { FaExclamationTriangle } from 'react-icons/fa'; /** * Component for rendering SearchUI data in a certain view dynamically * based on the current view state, error state, and number * of results. The view is determined by the `SearchUIContainer`'s `view` prop. */ export const SearchUIDataView: React.FC = () => { const { state, query } = useSearchUIContext(); const getDataView = () => { if (state.error) { return (
You may have entered an invalid search value. Otherwise, the API may be temporarily unavailable.
No records match your search criteria