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>{' '}
(click to show/hide)
</span>
{isAdmin && (
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<UIButton
onClick={resetJoinCode}
style={{
backgroundColor: lightgrey,
margin: '0.5rem',
flex: 1,
}}
>
Reset
</UIButton>
<UIButton
onClick={generateJoinCode}
style={{
backgroundColor: lightgrey,
margin: '0.5rem',
flex: 1,
}}
>
Regenerate
</UIButton>
<UIButton onClick={() => {navigator.clipboard.writeText("https://www.wheelshare.app/join/"+group.joinCode)}} style={{
backgroundColor: lightgrey,
margin: '0.5rem',
flex: 1,
}}>
Copy Link
</UIButton>
</div>
)}
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
{isAdmin && (
<>
<UIButton
onClick={resetJoinCode}
style={{
backgroundColor: lightgrey,
margin: '0.5rem',
flex: 1,
}}
>
Reset
</UIButton>
<UIButton
onClick={generateJoinCode}
style={{
backgroundColor: lightgrey,
margin: '0.5rem',
flex: 1,
}}
>
Regenerate
</UIButton>
</>
)}
<UIButton
onClick={() => {
navigator.clipboard.writeText(
'https://www.wheelshare.app/join/' + group.joinCode
);
}}
style={{
backgroundColor: lightgrey,
margin: '0.5rem',
flex: 1,
}}
>
Copy Link
</UIButton>
</div>
</>
);
} else {