Initial commit
This commit is contained in:
commit
2f5e10140c
133 changed files with 10429 additions and 0 deletions
28
packages/web/src/components/sidebar.tsx
Normal file
28
packages/web/src/components/sidebar.tsx
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { useStorage } from "@tensamin/core-storage/context";
|
||||
import Wrapper from "@tensamin/core-user/wrapper";
|
||||
import { createEffect, createSignal } from "solid-js";
|
||||
import Basic from "./modals/basic";
|
||||
import List from "@/features/conversation/list/body";
|
||||
|
||||
export default function Sidebar() {
|
||||
const [userId, setUserId] = createSignal(0);
|
||||
const { load } = useStorage();
|
||||
|
||||
createEffect(() => {
|
||||
load("user_id").then(setUserId);
|
||||
});
|
||||
|
||||
return (
|
||||
<div class="w-75 h-full flex flex-col gap-3 p-2">
|
||||
{userId() !== 0 && (
|
||||
<Wrapper
|
||||
userId={userId()}
|
||||
component={(user) => <Basic user={user} />}
|
||||
/>
|
||||
)}
|
||||
<div class="h-full">
|
||||
<List />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue