Formatted, fixed some ttp stuff
This commit is contained in:
parent
c0102df54f
commit
d77271e4b7
27 changed files with 1089 additions and 371 deletions
|
|
@ -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