Updated some webtransport stuff
This commit is contained in:
parent
4613f1585b
commit
f1ad6f915e
5 changed files with 224 additions and 52 deletions
|
|
@ -1,27 +1,9 @@
|
|||
import { useStorage } from "@tensamin/storage/context";
|
||||
import Wrapper from "@tensamin/user/wrapper";
|
||||
import { type User } from "@tensamin/user/context";
|
||||
import * as React from "react";
|
||||
import { Basic, Loading } from "./modals/basic";
|
||||
import List from "@/features/conversation/list/body";
|
||||
|
||||
/**
|
||||
* Renders sidebar user summary content for the current user.
|
||||
* @param user Loaded user data.
|
||||
* @returns Sidebar user card JSX.
|
||||
*/
|
||||
function renderSidebarUser(user: User): React.ReactNode {
|
||||
return <Basic user={user} />;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders sidebar user summary content skeleton while loading user data.
|
||||
* @returns Sidebar user card skeleton JSX.
|
||||
*/
|
||||
function renderSidebarUserLoading(): React.ReactNode {
|
||||
return <Loading />;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the conversation sidebar with account summary and conversation list.
|
||||
* @returns Sidebar JSX.
|
||||
|
|
@ -37,9 +19,9 @@ export default function Sidebar() {
|
|||
return (
|
||||
<div className="w-75 h-full flex flex-col gap-3 p-2">
|
||||
<Wrapper
|
||||
loading={renderSidebarUserLoading()}
|
||||
loading={<Loading />}
|
||||
userId={userId}
|
||||
component={renderSidebarUser}
|
||||
component={(user) => <Basic user={user} />}
|
||||
/>
|
||||
<div className="h-full">
|
||||
<List />
|
||||
|
|
|
|||
Loading…
Reference in a new issue