Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/features/Endpoint/Endpoint.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
height: 140vh;
justify-content: center;
padding-top: rem(6);
margin: 0 auto;

.content {
display: flex;
Expand Down
9 changes: 8 additions & 1 deletion src/features/Endpoint/Endpoint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ const EndPoint = () => {
window.location.reload();
};

const refreshWhenSubmitted = () => window.location.reload();

const server_url = localStorage.getItem('config.server_url') ?? default_endpoint.server_url;
const app_id = localStorage.getItem('config.app_id') ?? default_endpoint.app_id;
const current_url = `wss://${server_url}/websockets/v3?app_id=${app_id}&l=EN&brand=deriv`;
Expand Down Expand Up @@ -105,7 +107,12 @@ const EndPoint = () => {
<div className={styles.urlLink}>{current_url}</div>
</div>
<div className={styles.buttons}>
<Button type='submit' color='primary' disabled={Object.keys(errors).length > 0}>
<Button
type='submit'
color='primary'
onClick={refreshWhenSubmitted}
disabled={Object.keys(errors).length > 0}
>
Submit
</Button>
<span style={{ marginLeft: '1.6rem' }} />
Expand Down