From f8352e18893c5b560e10f0942919f9dd064fd94b Mon Sep 17 00:00:00 2001 From: Josh Heng Date: Mon, 2 Aug 2021 14:45:10 +0100 Subject: [PATCH] Make requested changes --- src/views/Search.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/views/Search.js b/src/views/Search.js index 300c7465..836c9088 100644 --- a/src/views/Search.js +++ b/src/views/Search.js @@ -122,13 +122,8 @@ export function SearchView() { React.useEffect(() => { if (streamRouteMatch) { - if (streamRouteMatch?.params.type === 'movie' || streamRouteMatch.params.type === 'show') { - if (streamRouteMatch?.params.source === 'lookmovie' || streamRouteMatch.params.source === 'gomostream') { - getStream(streamRouteMatch.params.title, streamRouteMatch.params.slug, streamRouteMatch.params.type, streamRouteMatch.params.source); - } - else return setErrorStatus(`I couldn't find that ${streamRouteMatch.params.type}. Please try searching below.`); - } - else return setErrorStatus("I couldn't find that movie. Please try searching below."); + if (streamRouteMatch?.params.type === 'movie' || streamRouteMatch.params.type === 'show') getStream(streamRouteMatch.params.title, streamRouteMatch.params.slug, streamRouteMatch.params.type, streamRouteMatch.params.source); + else return setErrorStatus("Failed to find movie. Please try searching below."); } // eslint-disable-next-line react-hooks/exhaustive-deps }, []);