mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
refactor: move affine utils into @affine/workspace (#2611)
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
setLoginStorage,
|
||||
SignMethod,
|
||||
} from '@affine/workspace/affine/login';
|
||||
import { affineAuth } from '@affine/workspace/affine/shared';
|
||||
import type { LocalWorkspace } from '@affine/workspace/type';
|
||||
import { WorkspaceFlavour } from '@affine/workspace/type';
|
||||
import {
|
||||
@@ -20,7 +21,6 @@ import React, { useEffect, useState } from 'react';
|
||||
import { useCurrentWorkspace } from '../../../../hooks/current/use-current-workspace';
|
||||
import { useTransformWorkspace } from '../../../../hooks/use-transform-workspace';
|
||||
import type { AffineOfficialWorkspace } from '../../../../shared';
|
||||
import { affineAuth } from '../../../../shared/apis';
|
||||
import { TransformWorkspaceToAffineModal } from '../../../affine/transform-workspace-to-affine-modal';
|
||||
|
||||
const IconWrapper = styled('div')(() => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { MessageCode, Messages } from '@affine/env/constant';
|
||||
import { setLoginStorage, SignMethod } from '@affine/workspace/affine/login';
|
||||
import type React from 'react';
|
||||
import { affineAuth } from '@affine/workspace/affine/shared';
|
||||
import type { FC } from 'react';
|
||||
import { memo, useEffect, useState } from 'react';
|
||||
|
||||
import { useAffineLogOut } from '../../../hooks/affine/use-affine-log-out';
|
||||
import { affineAuth } from '../../../shared/apis';
|
||||
import { toast } from '../../../utils';
|
||||
|
||||
declare global {
|
||||
@@ -15,7 +15,7 @@ declare global {
|
||||
}
|
||||
}
|
||||
|
||||
export const MessageCenter: React.FC = memo(function MessageCenter() {
|
||||
export const MessageCenter: FC = memo(function MessageCenter() {
|
||||
const [popup, setPopup] = useState(false);
|
||||
const onLogout = useAffineLogOut();
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user