Formatted, fixed some ttp stuff

This commit is contained in:
Alois 2026-03-14 19:58:13 +01:00
commit d77271e4b7
27 changed files with 1089 additions and 371 deletions

View file

@ -1,5 +1,10 @@
import { Button } from "@tensamin/ui/cmp/button";
import { Card, CardContent, CardHeader, CardTitle } from "@tensamin/ui/cmp/card";
import {
Card,
CardContent,
CardHeader,
CardTitle,
} from "@tensamin/ui/cmp/card";
import { Input } from "@tensamin/ui/cmp/input";
import { Label } from "@tensamin/ui/cmp/label";
import { useStorage } from "@tensamin/storage/context";

View file

@ -15,10 +15,7 @@ export default function Sidebar() {
return (
<div className="w-75 h-full flex flex-col gap-3 p-2">
{userId !== 0 && (
<Wrapper
userId={userId}
component={(user) => <Basic user={user} />}
/>
<Wrapper userId={userId} component={(user) => <Basic user={user} />} />
)}
<div className="h-full">
<List />

View file

@ -72,4 +72,4 @@ export function useConversation(): contextValue {
);
}
return context;
}
}

View file

@ -16,7 +16,8 @@ export default function List() {
const scrollRef = React.useRef<HTMLDivElement | null>(null);
const virtualizer = useVirtualizer({
count: category === "conversations" ? conversations.length : communities.length,
count:
category === "conversations" ? conversations.length : communities.length,
estimateSize: () => 80,
getScrollElement: () => scrollRef.current,
});
@ -24,7 +25,11 @@ export default function List() {
return (
<div className="flex flex-col gap-3">
<Switch category={category} setCategory={setCategory} />
<div ref={scrollRef} id="conversation-list" className="overflow-y-auto flex-1">
<div
ref={scrollRef}
id="conversation-list"
className="overflow-y-auto flex-1"
>
<div
className="relative w-full flex flex-col gap-2"
style={{
@ -61,4 +66,4 @@ export default function List() {
</div>
</div>
);
}
}

View file

@ -74,4 +74,4 @@ export default function Switch(props: {
</button>
</div>
);
}
}