Skip to content

Commit

Permalink
Merge pull request #73 from beda-software/65-live-demo-white-screen
Browse files Browse the repository at this point in the history
#65 Live demo white screen
  • Loading branch information
ir4y committed Jun 18, 2024
2 parents e29c8b6 + f23cc91 commit 337f55b
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions web/src/containers/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,35 @@ interface SignInProps {
}

function SignIn(props: SignInProps) {
const clientId = localStorage.getItem('clientId');
if (clientId) {
authorize(clientId, { nextUrl: props.originPathName });
} else {
console.error('Client ID is not specified');
}
useEffect(() => {
const clientId = localStorage.getItem('clientId');
if (clientId != null) {
authorize(clientId, { nextUrl: props.originPathName });
}
}, [props.originPathName]);

return null;
const handleAuthorizeClick = () => {
authorize('sdc-ide', { nextUrl: props.originPathName });
};

return (
<div style={{ textAlign: 'center', marginTop: '50px' }}>
<h2>Welcome to SDC IDE!</h2>
<p>
To launch the IDE on top of EMR, please use the following default login credentials:
<br />
Username: admin / receptionist / practitioner1 / practitioner2 <br />
Password: password
</p>
<p>
Click{' '}
<a href="#" onClick={handleAuthorizeClick}>
here
</a>{' '}
to run IDE on top of EMR.
</p>
</div>
);
}

export function Auth() {
Expand Down

0 comments on commit 337f55b

Please sign in to comment.