mirror of
https://github.com/etkecc/synapse-admin.git
synced 2024-11-24 08:35:31 +03:00
Fix a few undefined records (#580)
This commit is contained in:
parent
eb626a7e9e
commit
77cc936710
3 changed files with 3 additions and 3 deletions
|
@ -87,7 +87,7 @@ const DestinationTitle = () => {
|
||||||
const translate = useTranslate();
|
const translate = useTranslate();
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
{translate("resources.destinations.name", 1)} {record.destination}
|
{translate("resources.destinations.name", 1)} {record?.destination}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -65,7 +65,7 @@ const RoomTitle = () => {
|
||||||
|
|
||||||
const RoomShowActions = () => {
|
const RoomShowActions = () => {
|
||||||
const record = useRecordContext();
|
const record = useRecordContext();
|
||||||
const publishButton = record.public ? <RoomDirectoryUnpublishButton /> : <RoomDirectoryPublishButton />;
|
const publishButton = record?.public ? <RoomDirectoryUnpublishButton /> : <RoomDirectoryPublishButton />;
|
||||||
// FIXME: refresh after (un)publish
|
// FIXME: refresh after (un)publish
|
||||||
return (
|
return (
|
||||||
<TopToolbar>
|
<TopToolbar>
|
||||||
|
|
|
@ -140,7 +140,7 @@ const UserEditActions = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TopToolbar>
|
<TopToolbar>
|
||||||
{!record.deactivated && <ServerNoticeButton />}
|
{!record?.deactivated && <ServerNoticeButton />}
|
||||||
<DeleteButton
|
<DeleteButton
|
||||||
label="resources.users.action.erase"
|
label="resources.users.action.erase"
|
||||||
confirmTitle={translate("resources.users.helper.erase", {
|
confirmTitle={translate("resources.users.helper.erase", {
|
||||||
|
|
Loading…
Reference in a new issue