1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-10 01:51:10 +09:00

JS-4249: fix

This commit is contained in:
Andrew Simachev 2024-03-29 10:40:22 +01:00
parent 776af0e187
commit db8cb6771a
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8

View file

@ -2,7 +2,7 @@ import * as React from 'react';
import $ from 'jquery';
import { observer } from 'mobx-react';
import { Icon, Title, Label, Button } from 'Component';
import { I, C, UtilRouter, translate, Action, analytics } from 'Lib';
import { I, C, UtilRouter, translate, Action, analytics, UtilSpace } from 'Lib';
import { notificationStore, popupStore, commonStore } from 'Store';
import Constant from 'json/constant.json';
@ -24,6 +24,7 @@ const Notification = observer(class Notification extends React.Component<I.Notif
const { space } = commonStore;
const { id, type, payload, title, text } = item;
const { errorCode, spaceId } = payload;
const spaceview = UtilSpace.getSpaceviewBySpaceId(spaceId);
let buttons = [];
@ -64,6 +65,10 @@ const Notification = observer(class Notification extends React.Component<I.Notif
};
if ([ I.SpaceStatus.Removing, I.SpaceStatus.Deleted ].includes(spaceview.spaceAccountStatus)) {
buttons = buttons.filter(it => ![ 'spaceSwitch', 'spaceExport', 'spaceDelete' ].includes(it.id));
};
return (
<div
id={`notification-${id}`}