Skip to content

Commit

Permalink
Show project name in document title fixes #476
Browse files Browse the repository at this point in the history
  • Loading branch information
charlielee committed Nov 29, 2023
1 parent 88b5e0b commit 7865797
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/renderer/components/common/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ import AppListener from "../AppListener/AppListener";
import AppLoad from "../AppLoad/AppLoad";
import { useSelector } from "react-redux";
import { RootState } from "../../../redux/store";
import { useEffect } from "react";

const App = (): JSX.Element => {
const { project, take } = useSelector((state: RootState) => state.project);

useEffect(() => {
document.title = project ? `${project.name} - Boats Animator` : "Boats Animator";
}, [project]);

return (
<>
<AppListener />
Expand Down

0 comments on commit 7865797

Please sign in to comment.