show group code copy link always

This commit is contained in:
Michael Fatemi 2021-08-11 21:28:53 -04:00
parent 88905a16ee
commit 5725e4cbff

View File

@ -43,37 +43,46 @@ export default function GroupInviteCode() {
</code>{' '} </code>{' '}
(click to show/hide) (click to show/hide)
</span> </span>
{isAdmin && ( <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}> {isAdmin && (
<UIButton <>
onClick={resetJoinCode} <UIButton
style={{ onClick={resetJoinCode}
backgroundColor: lightgrey, style={{
margin: '0.5rem', backgroundColor: lightgrey,
flex: 1, margin: '0.5rem',
}} flex: 1,
> }}
Reset >
</UIButton> Reset
<UIButton </UIButton>
onClick={generateJoinCode} <UIButton
style={{ onClick={generateJoinCode}
backgroundColor: lightgrey, style={{
margin: '0.5rem', backgroundColor: lightgrey,
flex: 1, margin: '0.5rem',
}} flex: 1,
> }}
Regenerate >
</UIButton> Regenerate
<UIButton onClick={() => {navigator.clipboard.writeText("https://www.wheelshare.app/join/"+group.joinCode)}} style={{ </UIButton>
backgroundColor: lightgrey, </>
margin: '0.5rem', )}
flex: 1, <UIButton
}}> onClick={() => {
Copy Link navigator.clipboard.writeText(
</UIButton> 'https://www.wheelshare.app/join/' + group.joinCode
</div> );
)} }}
style={{
backgroundColor: lightgrey,
margin: '0.5rem',
flex: 1,
}}
>
Copy Link
</UIButton>
</div>
</> </>
); );
} else { } else {