diff options
| author | MaheshtheDev <[email protected]> | 2026-01-26 03:44:34 +0000 |
|---|---|---|
| committer | MaheshtheDev <[email protected]> | 2026-01-26 03:44:34 +0000 |
| commit | 99585f338c533d422c48872c3469d3cd871de7ab (patch) | |
| tree | 34a514faaddf705a5a7b5b879d5f992346de5319 /apps/web/app | |
| parent | chore: mobile banner for inconsistency and auto redirect in wrong route (#704) (diff) | |
| download | supermemory-01-24-fix_chat_mobile_open.tar.xz supermemory-01-24-fix_chat_mobile_open.zip | |
fix: chat mobile open (#705)01-24-fix_chat_mobile_open
Diffstat (limited to 'apps/web/app')
| -rw-r--r-- | apps/web/app/new/page.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/web/app/new/page.tsx b/apps/web/app/new/page.tsx index 61c573f3..0eb8613c 100644 --- a/apps/web/app/new/page.tsx +++ b/apps/web/app/new/page.tsx @@ -1,6 +1,6 @@ "use client" -import { useState, useCallback } from "react" +import { useState, useCallback, useEffect } from "react" import { Header } from "@/components/new/header" import { ChatSidebar } from "@/components/new/chat" import { MemoriesGrid } from "@/components/new/memories-grid" @@ -101,6 +101,10 @@ export default function NewPage() { }) const [isChatOpen, setIsChatOpen] = useState(!isMobile) + useEffect(() => { + setIsChatOpen(!isMobile) + }, [isMobile]) + const handleOpenDocument = useCallback((document: DocumentWithMemories) => { if (document.id) { analytics.documentModalOpened({ document_id: document.id }) |