memos/web/src/components/ExploreSidebar/ExploreSidebar.tsx
2025-01-15 19:25:36 +08:00

37 lines
848 B
TypeScript

import clsx from "clsx";
import useDebounce from "react-use/lib/useDebounce";
import SearchBar from "@/components/SearchBar";
import { useUserStatsStore } from "@/store/v1";
import TagsSection from "../HomeSidebar/TagsSection";
import StatisticsView from "../StatisticsView";
interface Props {
className?: string;
}
const ExploreSidebar = (props: Props) => {
const userStatsStore = useUserStatsStore();
useDebounce(
async () => {
userStatsStore.listUserStats();
},
300,
[],
);
return (
<aside
className={clsx(
"relative w-full h-auto max-h-screen overflow-auto hide-scrollbar flex flex-col justify-start items-start",
props.className,
)}
>
<SearchBar />
<StatisticsView />
<TagsSection readonly={true} />
</aside>
);
};
export default ExploreSidebar;