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:
parent
776af0e187
commit
db8cb6771a
1 changed files with 6 additions and 1 deletions
|
@ -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}`}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue