'use client'; import { useSearchParams } from 'next/navigation'; import List from '@/components/List'; import NoResults from '@/components/NoResults'; import useSimilar from './useSimilar'; const Container = () => { const params = useSearchParams(); const title = params.get('title') as string; const showId = params.get('id') as string; const showType = params.get('type') as Show['type']; const { shows, fetchNextPage, isFetched } = useSimilar({ showId, showType }); return ( <> {Boolean(title) && ( Similar: {decodeURIComponent(title)} )} {isFetched && !shows.length && } ); }; export default Container;