huskies: merge 488_story_web_ui_shows_project_name_in_browser_tab_with_huskies_favicon
This commit is contained in:
@@ -51,6 +51,17 @@ function App() {
|
||||
});
|
||||
}, []);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (projectPath) {
|
||||
const projectName =
|
||||
projectPath.replace(/\\/g, "/").split("/").filter(Boolean).pop() ??
|
||||
projectPath;
|
||||
document.title = `${projectName} | Huskies`;
|
||||
} else {
|
||||
document.title = "Huskies";
|
||||
}
|
||||
}, [projectPath]);
|
||||
|
||||
React.useEffect(() => {
|
||||
api
|
||||
.getKnownProjects()
|
||||
|
||||
Reference in New Issue
Block a user