зеркало из https://github.com/mozilla/treeherder.git
Add tab name Alert#<number> when we view a certain alert (#7987)
This commit is contained in:
Родитель
ef61c2e79e
Коммит
56bb810e3a
11
ui/App.jsx
11
ui/App.jsx
|
@ -99,7 +99,16 @@ const faviconPaths = {
|
|||
};
|
||||
|
||||
const withFavicon = (element, route) => {
|
||||
const { title, favicon } = faviconPaths[route];
|
||||
let { title } = faviconPaths[route];
|
||||
const { favicon } = faviconPaths[route];
|
||||
|
||||
const searchParams = new URLSearchParams(history.location.search);
|
||||
const id = searchParams.get('id');
|
||||
|
||||
if (history.location.pathname === '/perfherder/alerts' && id) {
|
||||
title = `Alert #${id.toString()}`;
|
||||
}
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Helmet defaultTitle={title}>
|
||||
|
|
Загрузка…
Ссылка в новой задаче