This repository was archived by the owner on May 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import { useCallback } from 'react';
33
44const useLoginUrl = ( ) => {
55 const getUrl = useCallback ( ( language = 'en' ) => {
6- const { appId, oauth } = getServerConfig ( ) ;
7- return generateLoginUrl ( language , oauth , appId ) ;
6+ const { appId, serverUrl } = getServerConfig ( ) ;
7+ return generateLoginUrl ( language , serverUrl , appId ) ;
88 } , [ ] ) ;
99
1010 return { getUrl } ;
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import moment from 'moment';
22import { IUserLoginAccount } from '../contexts/auth/auth.context' ;
33import { TScopes } from '../types' ;
44import {
5- DEFAULT_WS_SERVER ,
65 LOCALHOST_APP_ID ,
76 PRODUCTION_APP_ID ,
87 STAGING_APP_ID ,
@@ -131,21 +130,18 @@ export const getServerConfig = () => {
131130 return {
132131 serverUrl : config_server_url ,
133132 appId : config_app_id ,
134- oauth : OAUTH_URL ,
135133 } ;
136134 } else {
137135 const isLocalHost = isHost ( 'localhost' ) ;
138136 return {
139- serverUrl : DEFAULT_WS_SERVER ,
137+ serverUrl : OAUTH_URL ,
140138 appId : getAppId ( isLocalHost ) ,
141- oauth : OAUTH_URL ,
142139 } ;
143140 }
144141 } else {
145142 return {
146- serverUrl : DEFAULT_WS_SERVER ,
143+ serverUrl : OAUTH_URL ,
147144 appId : getAppId ( false ) ,
148- oauth : OAUTH_URL ,
149145 } ;
150146 }
151147} ;
You can’t perform that action at this time.
0 commit comments