Formatted, fixed some ttp stuff
This commit is contained in:
parent
c0102df54f
commit
d77271e4b7
27 changed files with 1089 additions and 371 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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 />
|
||||
|
|
|
|||
|
|
@ -72,4 +72,4 @@ export function useConversation(): contextValue {
|
|||
);
|
||||
}
|
||||
return context;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,4 +74,4 @@ export default function Switch(props: {
|
|||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue