mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-07 08:26:15 +00:00
responsiveness
This commit is contained in:
parent
61fdc548c5
commit
3b07a9ecc9
2 changed files with 20 additions and 2 deletions
|
|
@ -17,6 +17,10 @@ export default function RootLayout({
|
|||
return (
|
||||
<html lang="en">
|
||||
<body className={roboto.className}>
|
||||
<div
|
||||
id="d"
|
||||
className="fixed left-0 top-0 h-[5px] w-screen bg-red-500"
|
||||
></div>
|
||||
<div vaul-drawer-wrapper="" className="min-w-screen overflow-x-hidden">
|
||||
{children}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
"use client";
|
||||
import { useState } from "react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { FilterCombobox } from "./Sidebar/FilterCombobox";
|
||||
import { Textarea2 } from "./ui/textarea";
|
||||
import { ArrowRight } from "lucide-react";
|
||||
|
|
@ -10,12 +10,26 @@ export default function Main({ sidebarOpen }: { sidebarOpen: boolean }) {
|
|||
const [value, setValue] = useState("");
|
||||
const { width } = useViewport();
|
||||
|
||||
const textArea = useRef<HTMLTextAreaElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
function onResize() {
|
||||
if (!textArea.current || !window.visualViewport) return;
|
||||
|
||||
const visualViewportHeight = window.visualViewport.height;
|
||||
}
|
||||
|
||||
window.visualViewport?.addEventListener("resize", onResize);
|
||||
return () => window.visualViewport?.removeEventListener("resize", onResize);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<main
|
||||
data-sidebar-open={sidebarOpen}
|
||||
className="flex h-screen max-h-screen w-full items-end justify-center px-5 py-40 md:items-center md:px-60 md:[&[data-sidebar-open='true']]:px-20"
|
||||
className="flex h-screen max-h-screen w-full items-end justify-center px-5 pb-[20vh] pt-5 md:items-center md:px-60 md:[&[data-sidebar-open='true']]:px-20"
|
||||
>
|
||||
<Textarea2
|
||||
ref={textArea}
|
||||
className="h-max max-h-[30em] min-h-[3em] resize-y flex-row items-start justify-center overflow-auto py-5 md:h-[20vh] md:resize-none md:flex-col md:items-center md:justify-center md:p-2 md:pb-2 md:pt-2"
|
||||
textAreaProps={{
|
||||
placeholder: "Ask your SuperMemory...",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue