feat: add watch dynamic graph

This commit is contained in:
Kentai Radiquum 2024-08-24 05:45:30 +05:00
parent 6e8f03e7b6
commit 7dac3c072e
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
7 changed files with 133 additions and 334 deletions

View file

@ -10,6 +10,7 @@ import { ProfileBannedBanner } from "#/components/Profile/ProfileBannedBanner";
import { ProfilePrivacyBanner } from "#/components/Profile/Profile.PrivacyBanner";
import { ProfileActivity } from "#/components/Profile/Profile.Activity";
import { ProfileStats } from "#/components/Profile/Profile.Stats";
import { ProfileWatchDynamic } from "#/components/Profile/Profile.WatchDynamic";
export const ProfilePage = (props: any) => {
const authUser = useUserStore((state) => state);
@ -135,19 +136,24 @@ export const ProfilePage = (props: any) => {
</div>
)}
{!user.is_stats_hidden && (
<div className="[grid-column:1] xl:[grid-column:2] xl:[grid-row:span_2]">
<ProfileStats
lists={[
user.watching_count,
user.plan_count,
user.completed_count,
user.hold_on_count,
user.dropped_count,
]}
watched_count={user.watched_episode_count}
watched_time={user.watched_time}
/>
</div>
<>
<div className="[grid-column:1] xl:[grid-column:2] xl:[grid-row:span_2]">
<ProfileStats
lists={[
user.watching_count,
user.plan_count,
user.completed_count,
user.hold_on_count,
user.dropped_count,
]}
watched_count={user.watched_episode_count}
watched_time={user.watched_time}
/>
</div>
<div className="[grid-column:1] xl:[grid-column:2] xl:[grid-row:span_2]">
<ProfileWatchDynamic watchDynamic={user.watch_dynamics || []} />
</div>
</>
)}
</div>
</>