Conversation
|
There was a problem hiding this comment.
Pull request overview
Updates the Community Settings page header behavior to better match what a user can actually access, particularly when only a single settings tab is visible.
Changes:
- Adds session + global login method state to derive a conditional Settings page title (e.g., “Integrations” for certain employee SSO cases).
- Hides the tab bar when there’s only one visible tab.
- Replaces the hard-coded Settings header title with the derived
pageTitle.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -46,18 +63,20 @@ const Settings: NextPage = () => { | |||
| return ( | |||
| <ContentLayout | |||
| pageHead={translateText(["pageHead"])} | |||
There was a problem hiding this comment.
ContentLayout uses pageHead for the document <title>, but this page now conditionally changes the visible header title to "Integrations". That can leave the browser tab title saying "Settings | Skapp" while the page H1 says "Integrations". Consider switching pageHead to translateText(["integrationPageHead"]) when shouldShowIntegrationsTitle is true (the translation key already exists).
| pageHead={translateText(["pageHead"])} | |
| pageHead={ | |
| shouldShowIntegrationsTitle | |
| ? translateText(["integrationPageHead"]) | |
| : translateText(["pageHead"]) | |
| } |
| <Tabs | ||
| tabs={visibleTabs} | ||
| activeTabId={activeTab} | ||
| onTabChange={(id) => setActiveTab(id)} | ||
| size="lg" | ||
| /> |
There was a problem hiding this comment.
activeTab is initialized from visibleTabs[0]?.id only on the first render. If visibleTabs changes later (e.g., after auth/session state resolves or when switching environments/translations), activeTab can remain undefined or point to a tab that is no longer visible, which makes visibleTabs.find(...)? render nothing. Consider syncing activeTab in an effect when visibleTabs changes (e.g., set it to the first tab when it’s unset or no longer present).



PR checklist
TaskId: (https://github.com/SkappHQ/skapp/issues/[id])
Summary
How to test
Project Checklist
npm run formatnpm run check-lintOther
PR Checklist
ready-for-code-review)Additional Information