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,8 +43,9 @@ 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 <UIButton
onClick={resetJoinCode} onClick={resetJoinCode}
style={{ style={{
@ -65,15 +66,23 @@ export default function GroupInviteCode() {
> >
Regenerate Regenerate
</UIButton> </UIButton>
<UIButton onClick={() => {navigator.clipboard.writeText("https://www.wheelshare.app/join/"+group.joinCode)}} style={{ </>
)}
<UIButton
onClick={() => {
navigator.clipboard.writeText(
'https://www.wheelshare.app/join/' + group.joinCode
);
}}
style={{
backgroundColor: lightgrey, backgroundColor: lightgrey,
margin: '0.5rem', margin: '0.5rem',
flex: 1, flex: 1,
}}> }}
>
Copy Link Copy Link
</UIButton> </UIButton>
</div> </div>
)}
</> </>
); );
} else { } else {