docs: fix overflowing content on small devices (#11219)

This commit is contained in:
Shahed Nasser
2025-01-29 20:50:51 +02:00
committed by GitHub
parent 5634a4762b
commit e0bd2a79b0
2 changed files with 3 additions and 6 deletions

View File

@@ -152,7 +152,8 @@ export const AiAssistantChatWindow = () => {
"shadow-elevation-modal dark:shadow-elevation-modal-dark",
"bg-medusa-bg-base rounded-docs_DEFAULT overflow-x-hidden",
"flex-col justify-between m-docs_0.25 max-w-ai-assistant",
chatOpened && ["!right-0"]
chatOpened && ["!right-0"],
!chatOpened && ["!fixed"]
)}
style={{
height,

View File

@@ -24,11 +24,7 @@ export const LayoutProvider = ({
const [showCollapsedNavbar, setShowCollapsedNavbar] = useState(false)
useResizeObserver(mainContentRef as React.RefObject<HTMLDivElement>, () => {
if (disableResizeObserver) {
setShowCollapsedNavbar(false)
return
}
if (window.innerWidth < 992) {
if (disableResizeObserver || window.innerWidth < 992) {
setShowCollapsedNavbar(false)
return
}