import { IonCol, IonRouterLink } from '@ionic/react'; import { Link } from 'react-router-dom'; import styles from '../pages/Movies.module.scss'; const CustomSearchHit = ({ hit }): React.JSX.Element | null => { // Any movies without an image, lets just exclude them // So the UI looks nicer. // When I scraped the data, I put a placeholder URL image in // But after more thought, it looks cleaner without including these. if ( hit && hit.image !== 'https://critics.io/img/movies/poster-placeholder.png' && hit.backdrop_path !== null ) { return (
movie poster

{hit.title}

); } else { return null; } }; export default CustomSearchHit;