mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 18:16:15 +08:00
29 lines
721 B
TypeScript
29 lines
721 B
TypeScript
import { Button } from '@/ui/button';
|
|
import { useTranslation } from '@affine/i18n';
|
|
import { useState } from 'react';
|
|
import { EnableWorkspaceModal } from './EnableWorkspaceModal';
|
|
|
|
export const EnableWorkspaceButton = () => {
|
|
const { t } = useTranslation();
|
|
const [enableModalOpen, setEnableModalOpen] = useState(false);
|
|
return (
|
|
<>
|
|
<Button
|
|
type="primary"
|
|
shape="circle"
|
|
onClick={async () => {
|
|
setEnableModalOpen(true);
|
|
}}
|
|
>
|
|
{t('Enable AFFiNE Cloud')}
|
|
</Button>
|
|
<EnableWorkspaceModal
|
|
open={enableModalOpen}
|
|
onClose={() => {
|
|
setEnableModalOpen(false);
|
|
}}
|
|
></EnableWorkspaceModal>
|
|
</>
|
|
);
|
|
};
|