Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 166e588

Browse files
Hubert KosterHubert Koster
authored andcommitted
chore: small refactors
1 parent 060f790 commit 166e588

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export const isHost = (hostname: string) => {
5656

5757
/**
5858
* @description based on the environment which the project is running we must use different appIds, to get the proper redirect url
59-
* @param isLocalHost {boolean} pass `true` if the project is running on localhost
6059
* @returns {string} proper appId for the project
6160
*/
6261
export const getAppId = () => {
@@ -125,6 +124,7 @@ export const getServerConfig = () => {
125124
if (isBrowser) {
126125
const config_server_url = localStorage.getItem('config.server_url');
127126
const config_app_id = localStorage.getItem('config.app_id');
127+
128128
return {
129129
serverUrl: config_server_url ?? DEFAULT_WS_SERVER,
130130
appId: config_app_id ?? getAppId(),
@@ -139,8 +139,8 @@ export const getServerConfig = () => {
139139
}
140140
};
141141

142-
export const generateLoginUrl = (language: string, serverUrl: string, appId: string) => {
143-
return `https://${serverUrl}/oauth2/authorize?app_id=${appId}&l=${language}`;
142+
export const generateLoginUrl = (language: string, oauthUrl: string, appId: string) => {
143+
return `https://${oauthUrl}/oauth2/authorize?app_id=${appId}&l=${language}`;
144144
};
145145

146146
interface IScopesLike {

0 commit comments

Comments
 (0)