anix/feat: add interesting carousel to discovery page

This commit is contained in:
Kentai Radiquum 2025-08-25 06:46:51 +05:00
parent 93205fdb4e
commit bfb361a0a8
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
5 changed files with 121 additions and 15 deletions

View file

@ -1,19 +1,10 @@
"use client";
import { useState, useEffect } from "react";
import { useUserStore } from "../store/auth";
import { useRouter } from "next/navigation";
import { InterestingCarousel } from "#/components/Discovery/InterestingCarousel";
export const DiscoverPage = () => {
const token = useUserStore((state) => state.token);
const authState = useUserStore((state) => state.state);
const router = useRouter();
useEffect(() => {
if (authState === "finished" && !token) {
router.push("/login?redirect=/discover");
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [authState, token]);
return <></>;
return (
<>
<InterestingCarousel />
</>
);
};