mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 17:13:15 +00:00
(feat:layout) tablet sidebar behave like mobile
This commit is contained in:
@@ -29,8 +29,8 @@ function AuthWrapper({ children }: { children: React.ReactNode }) {
|
||||
}
|
||||
|
||||
function MainLayout() {
|
||||
const { isMobile } = useMediaQuery();
|
||||
const [navOpen, setNavOpen] = useState(!isMobile);
|
||||
const { isMobile, isTablet } = useMediaQuery();
|
||||
const [navOpen, setNavOpen] = useState(!(isMobile || isTablet));
|
||||
|
||||
return (
|
||||
<div className="relative h-screen overflow-hidden dark:bg-raisin-black">
|
||||
@@ -38,7 +38,7 @@ function MainLayout() {
|
||||
<ActionButtons showNewChat={true} showShare={true} />
|
||||
<div
|
||||
className={`h-[calc(100dvh-64px)] overflow-auto lg:h-screen ${
|
||||
!isMobile
|
||||
!(isMobile || isTablet)
|
||||
? `ml-0 ${!navOpen ? 'lg:mx-auto' : 'lg:ml-72'}`
|
||||
: 'ml-0 lg:ml-16'
|
||||
}`}
|
||||
|
||||
Reference in New Issue
Block a user