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

Commit 07988f4

Browse files
authored
Merge pull request #169 from hubert-deriv/add_production_endpoint2
Hubert / fixing small endpoint bugs
2 parents 0dcb432 + 4a349e8 commit 07988f4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/features/Endpoint/Endpoint.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
height: 140vh;
55
justify-content: center;
66
padding-top: rem(6);
7+
margin: 0 auto;
78

89
.content {
910
display: flex;

src/features/Endpoint/Endpoint.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ const EndPoint = () => {
3838
window.location.reload();
3939
};
4040

41+
const refreshWhenSubmitted = () => window.location.reload();
42+
4143
const server_url = localStorage.getItem('config.server_url') ?? default_endpoint.server_url;
4244
const app_id = localStorage.getItem('config.app_id') ?? default_endpoint.app_id;
4345
const current_url = `wss://${server_url}/websockets/v3?app_id=${app_id}&l=EN&brand=deriv`;
@@ -105,7 +107,12 @@ const EndPoint = () => {
105107
<div className={styles.urlLink}>{current_url}</div>
106108
</div>
107109
<div className={styles.buttons}>
108-
<Button type='submit' color='primary' disabled={Object.keys(errors).length > 0}>
110+
<Button
111+
type='submit'
112+
color='primary'
113+
onClick={refreshWhenSubmitted}
114+
disabled={Object.keys(errors).length > 0}
115+
>
109116
Submit
110117
</Button>
111118
<span style={{ marginLeft: '1.6rem' }} />

0 commit comments

Comments
 (0)