refactor: enhance layout structure and add secondary menu for risk an… - #300
Conversation
…d vendors pages - Integrated SecondaryMenu component into the layout for risk and vendors pages to improve navigation. - Updated authentication handling to retrieve the active organization ID for dynamic menu item generation. - Wrapped the main content in Suspense for better loading management. - Ensured consistent use of i18n for localized titles in the menu.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Caution Review failedThe pull request is closed. WalkthroughThis pull request involves two primary types of changes. For the risk overview page, the primary modifications are cosmetic: adjustments to indentation and formatting, along with replacing a wrapped component with a fragment. In contrast, both the risk and vendors layout files have been enhanced to be asynchronous. They now import additional modules for internationalization and authentication, fetch session details, and dynamically render a secondary menu using a Suspense wrapper based on session data. Changes
Sequence Diagram(s)sequenceDiagram
participant L as Layout Component
participant I as Internationalization (getI18n)
participant A as Auth API (getSession)
participant SM as SecondaryMenu Component
participant C as Children Content
L->>I: Call getI18n() to fetch i18n strings
I-->>L: Return localized strings
L->>A: Call auth.api.getSession() with headers
A-->>L: Return session information (including orgId)
L->>SM: Render SecondaryMenu with orgId & i18n label inside Suspense
L->>C: Render remaining children in layout
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…d vendors pages
Summary by CodeRabbit
New Features
Style