fix: fix login button logic in usermenu#194
Conversation
…o avoid overlap with main content
|
@ashert-hsueh is attempting to deploy a commit to the longsizhuo's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
是因为web-preview用的是另外一个域名,而我们的GitHub注册返回的是我们正式域名,所以我在prod域名下的preview运行看一下 |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the login button logic in the user menu by implementing conditional rendering to show either a user avatar menu or sign-in button based on authentication state. The changes also improve the dropdown's visual layering.
- Converted
baseOptions()to async function to fetch user session data - Added conditional rendering to show UserMenu for authenticated users or SignInButton for unauthenticated users
- Improved dropdown z-index to ensure proper layering above main content
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/layout.shared.tsx | Added session authentication and conditional user menu rendering |
| auth.ts | Removed empty line for code cleanup |
| app/docs/layout.tsx | Updated to handle async baseOptions function call |
| app/components/UserMenu.tsx | Added z-index styling to dropdown for proper layering |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Changes include: