Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_IMDB_KEY=449ca763
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function App() {
const [searchValue, setSearchValue] = useState("");

const getMovieRequest = async (searchValue) => {
const url = `http://www.omdbapi.com/?s=${searchValue}&apikey=449ca763`;
const url = `http://www.omdbapi.com/?s=${searchValue}&apikey=${process.env.REACT_APP_IMDB_KEY}`;

const response = await fetch(url);
const responseJson = await response.json();
Expand Down Expand Up @@ -65,7 +65,7 @@ function App() {
/>
<MovieHeading heading="Favourites" />
<MovieList
movies={favourites}
movies={favourites || []}
favouriteComponent={RemoveFavourites}
handleFavouriteClick={removeFavouriteMovie}
/>
Expand Down