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

Commit cdacf4a

Browse files
Hubert KosterHubert Koster
authored andcommitted
chore: removing some code
1 parent 0612046 commit cdacf4a

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

src/features/Endpoint/Endpoint.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const EndPoint = () => {
3838
const onResetClicked = () => {
3939
localStorage.removeItem('config.app_id');
4040
localStorage.removeItem('config.server_url');
41-
window.location.reload();
41+
refreshWhenSubmitted();
4242
};
4343

4444
const server_url = localStorage.getItem('config.server_url') ?? default_endpoint.server_url;

src/utils/__tests__/utils.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,6 @@ describe('Get Server Config', () => {
157157
jest.clearAllMocks();
158158
});
159159

160-
// describe('Given we are in SSR ( no browser object ) ', () => {
161-
// it('Should return default ws server url and vercel deployment appId', () => {
162-
// jest.spyOn(utils, 'getIsBrowser').mockReturnValueOnce(false);
163-
// const serverConfig = getServerConfig();
164-
// expect(serverConfig.appId).toEqual(VERCEL_DEPLOYMENT_APP_ID);
165-
// expect(serverConfig.serverUrl).toEqual(DEFAULT_WS_SERVER);
166-
// });
167-
// });
168160
describe('Given we are in Browser', () => {
169161
jest.spyOn(utils, 'getIsBrowser').mockReturnValue(true);
170162

src/utils/index.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ export const formatTokenScope = (tokenScope: string) => {
123123
};
124124

125125
export const getServerConfig = () => {
126-
// const isBrowser = getIsBrowser();
127-
// if (isBrowser) {
128126
const config_server_url = localStorage.getItem('config.server_url');
129127
const config_app_id = localStorage.getItem('config.app_id');
130128
if (config_app_id && config_server_url) {
@@ -141,13 +139,6 @@ export const getServerConfig = () => {
141139
oauth: OAUTH_URL,
142140
};
143141
}
144-
// } else {
145-
// return {
146-
// serverUrl: DEFAULT_WS_SERVER,
147-
// appId: getAppId(false),
148-
// oauth: OAUTH_URL,
149-
// };
150-
// }
151142
};
152143

153144
export const generateLoginUrl = (language: string, serverUrl: string, appId: string) => {

0 commit comments

Comments
 (0)