File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
apps/client/src/pages/onBoarding Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,16 @@ import LoadingChippi from '@shared/components/loadingChippi/LoadingChippi';
33import { useEffect } from 'react' ;
44import { useNavigate , useSearchParams } from 'react-router-dom' ;
55
6+ const sendTokenToExtension = ( token : string ) => {
7+ window . postMessage (
8+ {
9+ type : 'SET_TOKEN' ,
10+ token,
11+ } ,
12+ window . location . origin
13+ ) ;
14+ } ;
15+
616const GoogleCallback = ( ) => {
717 const navigate = useNavigate ( ) ;
818 const [ searchParams ] = useSearchParams ( ) ;
@@ -28,16 +38,6 @@ const GoogleCallback = () => {
2838 if ( isUser ) {
2939 if ( accessToken ) {
3040 localStorage . setItem ( 'token' , accessToken ) ;
31-
32- const sendTokenToExtension = ( token : string ) => {
33- window . postMessage (
34- {
35- type : 'SET_TOKEN' ,
36- token,
37- } ,
38- window . location . origin
39- ) ;
40- } ;
4141 sendTokenToExtension ( accessToken ) ;
4242 }
4343
You can’t perform that action at this time.
0 commit comments