style: make metadata draw titles visible on mob
All checks were successful
Deploy eolas-app / deploy (push) Successful in 48s

This commit is contained in:
Thomas Bishop 2025-12-01 19:19:33 +00:00
parent 1b5ac7ad00
commit 98e7611670

View file

@ -4,24 +4,26 @@ import EntryMetadata from "@/containers/EntryMetadata"
import { useIsMobile } from "@/hooks/use-mobile"
export default function Entry({ entryTitle, entryBody, history, metadata, isLoading }) {
const isMobile = useIsMobile()
const bottomPanelSize = isMobile ? 0 : 25
const handleSize = isMobile ? "5px" : "1px"
console.log(isMobile)
return (
<ResizablePanelGroup direction="vertical" className="w-full h-full">
<ResizablePanel defaultSize={75}>
<div className="h-full overflow-auto">
<EntryBody body={entryBody} isLoading={isLoading} />
</div>
</ResizablePanel>
<ResizableHandle withHandle style={{ height: handleSize }} />
const isMobile = useIsMobile()
<ResizablePanel key={`bottom-${bottomPanelSize}`} defaultSize={bottomPanelSize}>
<div className="h-full overflow-auto">
<EntryMetadata entryTitle={entryTitle} history={history} metadata={metadata} />
</div>
</ResizablePanel>
</ResizablePanelGroup>
)
const topPanelSize = isMobile ? 95 : 75
const bottomPanelSize = isMobile ? 5 : 25
const handleSize = isMobile ? "5px" : "1px"
console.log(isMobile)
return (
<ResizablePanelGroup direction="vertical" className="w-full h-full">
<ResizablePanel defaultSize={topPanelSize}>
<div className="h-full overflow-auto">
<EntryBody body={entryBody} isLoading={isLoading} />
</div>
</ResizablePanel>
<ResizableHandle withHandle style={{ height: handleSize }} />
<ResizablePanel key={`bottom-${bottomPanelSize}`} defaultSize={bottomPanelSize}>
<div className="h-full overflow-auto">
<EntryMetadata entryTitle={entryTitle} history={history} metadata={metadata} />
</div>
</ResizablePanel>
</ResizablePanelGroup>
)
}