refactor: move affine utils into @affine/workspace (#2611)

This commit is contained in:
Himself65
2023-05-31 13:13:59 +08:00
committed by GitHub
parent 6cbf310a5a
commit ee289706ec
18 changed files with 72 additions and 95 deletions

View File

@@ -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(() => {