diff --git a/ts/components/session/settings/SessionSettingsHeader.tsx b/ts/components/session/settings/SessionSettingsHeader.tsx
index 21e663e96..854438b59 100644
--- a/ts/components/session/settings/SessionSettingsHeader.tsx
+++ b/ts/components/session/settings/SessionSettingsHeader.tsx
@@ -12,6 +12,7 @@ interface Props extends SettingsViewProps {
showLinkDeviceButton: boolean | null;
// isSecondaryDevice is used to just disable the linkDeviceButton when we are already a secondary device
isSecondaryDevice: boolean;
+ categoryTitle: string;
}
export class SettingsHeader extends React.Component
{
@@ -63,16 +64,8 @@ export class SettingsHeader extends React.Component {
}
public render() {
- const { category } = this.props;
+ const { category, categoryTitle } = this.props;
const { disableLinkDeviceButton } = this.state;
- const categoryString = String(category);
- const categoryTitlePrefix =
- categoryString[0].toUpperCase() + categoryString.substr(1);
- // Remove 's' on the end to keep words in singular form
- const categoryTitle =
- categoryTitlePrefix[categoryTitlePrefix.length - 1] === 's'
- ? `${categoryTitlePrefix.slice(0, -1)} Settings`
- : `${categoryTitlePrefix} Settings`;
const showSearch = false;
const showAddDevice =
category === SessionSettingCategory.Devices &&
diff --git a/ts/session/utils/Menu.tsx b/ts/session/utils/Menu.tsx
index e6c47d372..165056090 100644
--- a/ts/session/utils/Menu.tsx
+++ b/ts/session/utils/Menu.tsx
@@ -141,9 +141,7 @@ export function getDeleteContactMenuItem(
): JSX.Element | null {
if (showDeleteContact(isMe, isClosable, isGroup, isPublic, isRss)) {
if (isPublic) {
- return (
-
- );
+ return ;
}
return ;
}
@@ -159,7 +157,7 @@ export function getLeaveGroupMenuItem(
i18n: LocalizerType
): JSX.Element | null {
if (showLeaveGroup(isKickedFromGroup, isGroup, isPublic, isRss)) {
- return ;
+ return ;
}
return null;
}