[go: nahoru, domu]

Skip to content

Commit

Permalink
Cleaning Up the Title
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirrMahmoudi committed Jan 4, 2024
1 parent 80b0a71 commit 5daea9e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ function MovieDetails({ selectedId, onCloseMovie, onAddWatched, watched }) {
function () {
if (!title) return;
document.title = `Movie | ${title}`;
return function () {
document.title = "usePopcorn";
console.log(`Clean up effect for movie ${title}`);
};
},
[title]
);
Expand Down

0 comments on commit 5daea9e

Please sign in to comment.