refactor: login method (#1676)

This commit is contained in:
Himself65
2023-03-23 16:29:29 -05:00
committed by GitHub
parent a415e4aa5c
commit 56acb2bdeb
22 changed files with 626 additions and 61 deletions

View File

@@ -4,7 +4,7 @@ import { messages } from '@affine/datacenter';
import type React from 'react';
import { memo, useEffect, useState } from 'react';
import { useOnGoogleLogout } from '../../../hooks/use-on-google-logout';
import { useAffineLogOut } from '../../../hooks/affine/use-affine-log-out';
import { apis } from '../../../shared/apis';
declare global {
@@ -17,7 +17,7 @@ declare global {
export const MessageCenter: React.FC = memo(function MessageCenter() {
const [popup, setPopup] = useState(false);
const onLogout = useOnGoogleLogout();
const onLogout = useAffineLogOut();
useEffect(() => {
const listener = (
event: CustomEvent<{