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}
inviteLinkEnabled={org.inviteLinkEnabled}
inviteLink={inviteLink}
anonymousAccessEnabled={anonymousAccessEnabled}
/>
</div>
)

View file

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