-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
인프라 이전 공지 내림 #426
인프라 이전 공지 내림 #426
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe changes involve modifications to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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 (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
apps/web/src/layout/GlobalLayout.tsx (2)
23-29
: Consider adding error handling for ChannelService calls.While the implementation is correct, adding try-catch blocks would make it more robust against potential runtime errors.
Consider wrapping the service calls with error handling:
useEffect(() => { if (location.pathname.startsWith(PATHS.myInfo())) { - ChannelService.showChannelButton(); + try { + ChannelService.showChannelButton(); + } catch (error) { + console.error('Failed to show channel button:', error); + } } else { - ChannelService.hideChannelButton(); + try { + ChannelService.hideChannelButton(); + } catch (error) { + console.error('Failed to hide channel button:', error); + } } }, [location]);
Infrastructure notice has been successfully removed, but Announcement component still exists
The infrastructure notice was successfully removed from GlobalLayout.tsx, but I found that the Announcement component still exists in the codebase at
apps/web/src/component/announcement/Announcement.tsx
. While this component might be used for other purposes, it's worth noting that:
- The component is still present but appears to be unused in GlobalLayout
- The component uses cookies to track visibility state
- There are other notice-related features in the app (like NoticePage) but they serve different purposes (e.g., general notices in the myInfo section)
🔗 Analysis chain
Line range hint
1-58
: Verify the infrastructure notice visibility.The changes correctly implement the PR objective by removing the infrastructure notice from the global layout while maintaining the Channel button visibility in the myInfo section only.
Let's verify no other instances of the infrastructure notice exist:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any remaining references to infrastructure notices rg -i "infra|notice|announcement|공지" --type tsx --type tsLength of output: 87
Script:
#!/bin/bash # Search for any remaining references to infrastructure notices with correct file extensions rg -i "infra|notice|announcement|공지" -t ts -t tsx # Also search for any components named Announcement or Notice ast-grep --pattern 'const $_ = $$$' -l typescript | xargs rg -i "announcement|notice" -A 2 -B 2Length of output: 714
Script:
#!/bin/bash # Search for any remaining references to infrastructure notices using ripgrep rg -i "(infra|notice|announcement|공지)" --type=typescript # Search for Announcement component imports rg -i "import.*announcement" --type=typescript # Search for Notice component imports rg -i "import.*notice" --type=typescriptLength of output: 255
Script:
#!/bin/bash # Find all TypeScript and TSX files first fd -e ts -e tsx | xargs rg -i "(infra|notice|announcement|공지)" # Search for component definitions or imports fd -e ts -e tsx | xargs rg -i "^(import|export).*\b(announcement|notice)\b" -A 1Length of output: 4613
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
apps/web/src/layout/GlobalLayout.tsx
(1 hunks)
🔇 Additional comments (2)
apps/web/src/layout/GlobalLayout.tsx (2)
3-3
: LGTM! Import changes are appropriate.
The added imports support the new Channel button visibility logic.
Also applies to: 5-5
16-16
: LGTM! Proper hook initialization.
The useLocation hook is correctly initialized at the component's top level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTV 📺
🏄🏼♂️ Summary (요약)
🫨 Describe your Change (변경사항)
🧐 Issue number and link (참고)
📚 Reference (참조)
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
GlobalLayout
component for improved functionality.