mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-14 08:25:07 +01:00
Make requested changes
This commit is contained in:
parent
b06f27eb97
commit
f8352e1889
@ -122,13 +122,8 @@ export function SearchView() {
|
|||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (streamRouteMatch) {
|
if (streamRouteMatch) {
|
||||||
if (streamRouteMatch?.params.type === 'movie' || streamRouteMatch.params.type === 'show') {
|
if (streamRouteMatch?.params.type === 'movie' || streamRouteMatch.params.type === 'show') getStream(streamRouteMatch.params.title, streamRouteMatch.params.slug, streamRouteMatch.params.type, streamRouteMatch.params.source);
|
||||||
if (streamRouteMatch?.params.source === 'lookmovie' || streamRouteMatch.params.source === 'gomostream') {
|
else return setErrorStatus("Failed to find movie. Please try searching below.");
|
||||||
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.");
|
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, []);
|
||||||
|
Loading…
Reference in New Issue
Block a user