mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
fix bug with anonymous access toggle
This commit is contained in:
parent
aac1d4529e
commit
eb00d72499
2 changed files with 2 additions and 5 deletions
|
|
@ -37,7 +37,6 @@ export async function OrganizationAccessSettings() {
|
||||||
memberApprovalRequired={org.memberApprovalRequired}
|
memberApprovalRequired={org.memberApprovalRequired}
|
||||||
inviteLinkEnabled={org.inviteLinkEnabled}
|
inviteLinkEnabled={org.inviteLinkEnabled}
|
||||||
inviteLink={inviteLink}
|
inviteLink={inviteLink}
|
||||||
anonymousAccessEnabled={anonymousAccessEnabled}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -8,16 +8,14 @@ interface OrganizationAccessSettingsWrapperProps {
|
||||||
memberApprovalRequired: boolean
|
memberApprovalRequired: boolean
|
||||||
inviteLinkEnabled: boolean
|
inviteLinkEnabled: boolean
|
||||||
inviteLink: string | null
|
inviteLink: string | null
|
||||||
anonymousAccessEnabled: boolean
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function OrganizationAccessSettingsWrapper({
|
export function OrganizationAccessSettingsWrapper({
|
||||||
memberApprovalRequired,
|
memberApprovalRequired,
|
||||||
inviteLinkEnabled,
|
inviteLinkEnabled,
|
||||||
inviteLink,
|
inviteLink
|
||||||
anonymousAccessEnabled
|
|
||||||
}: OrganizationAccessSettingsWrapperProps) {
|
}: OrganizationAccessSettingsWrapperProps) {
|
||||||
const [showInviteLink, setShowInviteLink] = useState(memberApprovalRequired && !anonymousAccessEnabled)
|
const [showInviteLink, setShowInviteLink] = useState(memberApprovalRequired)
|
||||||
|
|
||||||
const handleMemberApprovalToggle = (checked: boolean) => {
|
const handleMemberApprovalToggle = (checked: boolean) => {
|
||||||
setShowInviteLink(checked)
|
setShowInviteLink(checked)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue