Fix Bug 67579 - Srv: Spaces. The Backup section displays a back button.
This commit is contained in:
parent
272f27fef1
commit
d3bfdba97e
@ -55,15 +55,18 @@ const SectionHeaderContent = () => {
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
const path = location.pathname;
|
||||
const item = getItemByLink(path);
|
||||
const item = React.useMemo(() => getItemByLink(path), [path]);
|
||||
const isBackup = path.includes("backup");
|
||||
|
||||
const onBackToParent = () => {
|
||||
navigate(-1);
|
||||
};
|
||||
|
||||
const headerText = isBackup ? t("Backup") : t(item?.tKey);
|
||||
|
||||
return (
|
||||
<StyledHeader>
|
||||
{!item?.isHeader && (
|
||||
{item && !item?.isHeader && (
|
||||
<IconButton
|
||||
iconName={ArrowPathReactSvgUrl}
|
||||
size={17}
|
||||
@ -73,7 +76,7 @@ const SectionHeaderContent = () => {
|
||||
/>
|
||||
)}
|
||||
<Headline type="content" truncate={true}>
|
||||
<div className="header">{t(item?.tKey)}</div>
|
||||
<div className="header">{headerText}</div>
|
||||
</Headline>
|
||||
</StyledHeader>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user