Skip to content

university settings link#35

Merged
f0reachARR merged 1 commit intomainfrom
feature/user-settings
Apr 23, 2026
Merged

university settings link#35
f0reachARR merged 1 commit intomainfrom
feature/user-settings

Conversation

@f0reachARR
Copy link
Copy Markdown
Member

No description provided.

@f0reachARR f0reachARR enabled auto-merge April 23, 2026 02:53
@f0reachARR f0reachARR merged commit 1023e44 into main Apr 23, 2026
2 checks passed
@f0reachARR f0reachARR deleted the feature/user-settings branch April 23, 2026 02:54
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +11 to +12
const currentOrganization =
organizations.find((org) => org.id === activeOrganizationId) ?? organizations[0] ?? null;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
const currentOrganization =
organizations.find((org) => org.id === activeOrganizationId) ?? organizations[0] ?? null;
const currentOrganization =
organizations.find((org) => org.id === activeOrganizationId) ?? null;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant