feat: support disable legacy cloud (#2006)

This commit is contained in:
Himself65
2023-04-18 02:23:00 -05:00
committed by GitHub
parent 94063352f5
commit f6fb049ff2
11 changed files with 64 additions and 24 deletions

View File

@@ -1,6 +1,7 @@
import { FlexWrapper } from '@affine/component';
import { IconButton } from '@affine/component';
import { Tooltip } from '@affine/component';
import { config } from '@affine/env';
import { useTranslation } from '@affine/i18n';
import type { AccessTokenMessage } from '@affine/workspace/affine/login';
import { CloudWorkspaceIcon, SignOutIcon } from '@blocksuite/icons';
@@ -20,6 +21,10 @@ export type FooterProps = {
export const Footer: React.FC<FooterProps> = ({ user, onLogin, onLogout }) => {
const { t } = useTranslation();
if (!config.enableLegacyCloud) {
return null;
}
return (
<StyledFooter data-testid="workspace-list-modal-footer">
{user && (