@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
22import { useLocation , useNavigate } from '@umijs/max' ;
33import { Session } from '@/utils/storage' ;
44import { TOKEN_KEY } from '@/enums/cacheEnum' ;
5- import { App , Spin } from 'antd' ;
5+ import { message , Spin } from 'antd' ;
66import { useIntl } from '@@/exports' ;
77
88const INTL = {
@@ -17,14 +17,14 @@ const INTL = {
1717const Callback : React . FC = ( ) => {
1818 const location = useLocation ( ) ;
1919 const navigate = useNavigate ( ) ;
20- const { message } = App . useApp ( ) ;
2120 const intl = useIntl ( ) ;
2221
2322 useEffect ( ( ) => {
24- const handleCallback = ( ) => {
23+ const handleCallback = ( ) => {
2524 // Parse the query parameters from the URL
2625 const searchParams = new URLSearchParams ( location . search ) ;
2726 const accessToken = searchParams . get ( 'access_token' ) ;
27+
2828 if ( accessToken ) {
2929 // Store the token
3030 Session . set ( TOKEN_KEY , accessToken ) ;
@@ -39,7 +39,7 @@ const Callback: React.FC = () => {
3939 } ;
4040
4141 handleCallback ( ) ;
42- } , [ location , navigate , message , intl ] ) ;
42+ } , [ location , navigate , intl ] ) ;
4343
4444 return (
4545 < div style = { {
0 commit comments