Join session link
add link under the join button in browse sessions page
This commit is contained in:
parent
a420767446
commit
884203844b
|
|
@ -165,7 +165,8 @@ function JoinSessionButton({ session }) {
|
|||
const { setNativeAppUnavailable } = useNativeApp();
|
||||
const { t } = useTranslation();
|
||||
|
||||
async function joinSession() {
|
||||
async function joinSession(e) {
|
||||
e.preventDefault();
|
||||
if (session.musician_access && session.approval_required) {
|
||||
toast.info(t('list.alerts.join_request_sent', { ns: 'sessions' }));
|
||||
} else {
|
||||
|
|
@ -182,15 +183,20 @@ function JoinSessionButton({ session }) {
|
|||
}
|
||||
|
||||
return (
|
||||
<Button
|
||||
data-testid="joinBtn"
|
||||
color="primary"
|
||||
onClick={joinSession}
|
||||
className="btn-join btn-sm mr-1 mb-1 pt-1 pb-1 pl-1 pr-1"
|
||||
style={{ cursor: 'pointer' }}
|
||||
>
|
||||
<img src={EnterIcon} alt="enter" className="mr-1" width={20} />
|
||||
</Button>
|
||||
<div className='d-flex flex-column'>
|
||||
<Button
|
||||
data-testid="joinBtn"
|
||||
color="primary"
|
||||
onClick={joinSession}
|
||||
className="btn-join btn-sm mr-1 mb-1 pt-1 pb-1 pl-1 pr-1"
|
||||
style={{ cursor: 'pointer' }}
|
||||
>
|
||||
<img src={EnterIcon} alt="enter" className="mr-1" width={20} />
|
||||
</Button>
|
||||
<div>
|
||||
<a href="#" onClick={joinSession}>Join Session</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue