mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-11 20:05:25 +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}
|
||||
inviteLinkEnabled={org.inviteLinkEnabled}
|
||||
inviteLink={inviteLink}
|
||||
anonymousAccessEnabled={anonymousAccessEnabled}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,16 +8,14 @@ interface OrganizationAccessSettingsWrapperProps {
|
|||
memberApprovalRequired: boolean
|
||||
inviteLinkEnabled: boolean
|
||||
inviteLink: string | null
|
||||
anonymousAccessEnabled: boolean
|
||||
}
|
||||
|
||||
export function OrganizationAccessSettingsWrapper({
|
||||
memberApprovalRequired,
|
||||
inviteLinkEnabled,
|
||||
inviteLink,
|
||||
anonymousAccessEnabled
|
||||
inviteLink
|
||||
}: OrganizationAccessSettingsWrapperProps) {
|
||||
const [showInviteLink, setShowInviteLink] = useState(memberApprovalRequired && !anonymousAccessEnabled)
|
||||
const [showInviteLink, setShowInviteLink] = useState(memberApprovalRequired)
|
||||
|
||||
const handleMemberApprovalToggle = (checked: boolean) => {
|
||||
setShowInviteLink(checked)
|
||||
|
|
|
|||
Loading…
Reference in a new issue