mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-12 23:01:07 +00:00
fix: chat mobile open (#705)
This commit is contained in:
parent
837fb5d725
commit
99585f338c
1 changed files with 5 additions and 1 deletions
|
|
@ -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 })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue