diff --git a/.env.local b/.env.local new file mode 100644 index 0000000..166332a --- /dev/null +++ b/.env.local @@ -0,0 +1 @@ +REACT_APP_IMDB_KEY=449ca763 \ No newline at end of file diff --git a/src/App.js b/src/App.js index 0204315..9884b16 100644 --- a/src/App.js +++ b/src/App.js @@ -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(); @@ -65,7 +65,7 @@ function App() { />