fix(frontend): require session to show protected pages#1190
fix(frontend): require session to show protected pages#1190yassinedorbozgithub wants to merge 1 commit intomainfrom
Conversation
WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant NextRouter
participant ContentComponent
participant hasPublicPath
participant useAuth
User->>ContentComponent: Accesses route
ContentComponent->>NextRouter: Gets current pathname
ContentComponent->>useAuth: Checks if authenticated
ContentComponent->>hasPublicPath: Checks if pathname is public
hasPublicPath-->>ContentComponent: Returns true/false
useAuth-->>ContentComponent: Returns true/false
alt Path is public or user is authenticated
ContentComponent->>User: Renders children (display: block)
else Path is not public and user not authenticated
ContentComponent->>User: Hides children (display: none)
end
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ 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:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
4d383ff to
16e9ca1
Compare
Motivation
The main motivation of this PR are :
Fixes #410
Screen recording
require.session.to.show.protected.pages.webm
Type of change:
Checklist:
Summary by CodeRabbit