-
Notifications
You must be signed in to change notification settings - Fork 1
fix: 스켈레톤 해제와 배너 실패 코드 #3036
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
fix: 스켈레톤 해제와 배너 실패 코드 #3036
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -152,6 +152,12 @@ function HomeControlPanelComponent({ | |
| activeRightPanel = null, | ||
| selectedAnnouncement = null, | ||
| }: HomeControlPanelProps) { | ||
| useEffect(() => { | ||
| document.documentElement.dataset.homeChromeReady = "true"; | ||
| return () => { | ||
| delete document.documentElement.dataset.homeChromeReady; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On mobile/tablet, entering map fullscreen makes the conditional in Useful? React with 👍 / 👎. |
||
| }; | ||
| }, []); | ||
| const { isMobileOrTablet } = useDeviceType(); | ||
| const shouldRenderMobile = isMobileOrTablet || ( | ||
| typeof window !== 'undefined' && window.innerWidth <= BREAKPOINTS.tabletMax | ||
|
|
||
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.
On a fresh or throttled load, this effect runs when the outer
HomeControlPanelchunk mounts, but the mobile and desktop controls are subsequently loaded throughuseDeferredComponent, and this component returnsnulluntil that second chunk resolves. The new selector therefore removes the only loading UI while no control chrome is rendered, producing a blank gap; mark readiness only after the selected deferred component is available or has mounted.Useful? React with 👍 / 👎.