Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified the play not found message with search term #475

Closed
wants to merge 13 commits into from
Closed
7 changes: 5 additions & 2 deletions src/common/playlists/PlayList.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PlayThumbnail from "./PlayThumbnail";
import { ReactComponent as ImageOops } from "images/img-oops.svg";
import React, { Fragment, useEffect, useState } from "react";
import React, { Fragment, useEffect, useState, useContext } from "react";
import { SearchContext } from "common/search/search-context";
import "react-loader-spinner/dist/loader/css/react-spinner-loader.css";
import Loader from "common/spinner/spinner";
import * as all_plays from "plays";
Expand All @@ -14,6 +15,8 @@ const PlayList = () => {
const [loading, error, plays] = useGetPlays();
const [allPlays, setAllPlays] = useState([])

const { searchTerm } = useContext(SearchContext);

let { playid } = useParams(); // return the parameter of url

if (loading) {
Expand All @@ -24,7 +27,7 @@ const PlayList = () => {
return (
<div className='play-not-found'>
<ImageOops className='play-not-found-image' />
<p className='page-404-lead'>Play not found</p>
<p className='page-404-lead'>Play not found for "{ searchTerm }" </p>
Sachin-chaurasiya marked this conversation as resolved.
Show resolved Hide resolved
Sachin-chaurasiya marked this conversation as resolved.
Show resolved Hide resolved
<p className='page-404-desc'>
Please change your search or adjust filters to find plays.
</p>
Expand Down