university settings link#35
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds links to university settings on the dashboard and account settings page, and updates the useAccountSettingsForms hook to retrieve the current organization. A review comment suggests removing the fallback to the first organization in the hook to maintain consistency with the application's handling of active organizations.
| const currentOrganization = | ||
| organizations.find((org) => org.id === activeOrganizationId) ?? organizations[0] ?? null; |
There was a problem hiding this comment.
The fallback to organizations[0] when activeOrganizationId is null might lead to an inconsistent user experience. In dashboard/page.tsx, the application explicitly handles the case where no organization is active (showing an empty state when organizationId is null). By automatically picking the first organization here, the settings page might display information for an organization that isn't currently 'active' in the user's session, which can be confusing if the user belongs to multiple organizations. It is safer to rely strictly on the activeOrganizationId to determine the current context.
| const currentOrganization = | |
| organizations.find((org) => org.id === activeOrganizationId) ?? organizations[0] ?? null; | |
| const currentOrganization = | |
| organizations.find((org) => org.id === activeOrganizationId) ?? null; |
No description provided.