fix bug with anonymous access toggle

This commit is contained in:
msukkari 2025-07-19 16:18:58 -07:00
parent aac1d4529e
commit eb00d72499
2 changed files with 2 additions and 5 deletions

View file

@ -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>
) )

View file

@ -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)