diff --git a/app/api/config.ts b/app/api/config.ts
index 63b92ac..e75acb0 100644
--- a/app/api/config.ts
+++ b/app/api/config.ts
@@ -79,6 +79,7 @@ export const ENDPOINTS = {
interesting: `${API_PREFIX}/discover/interesting`,
discussing: `${API_PREFIX}/discover/discussing`,
watching: `${API_PREFIX}/discover/watching`,
- collections: `${API_PREFIX}/collection/all`
+ recommendations: `${API_PREFIX}/discover/recommendations`,
+ collections: `${API_PREFIX}/collection/all`,
}
};
diff --git a/app/components/Discovery/RecommendedCarousel.tsx b/app/components/Discovery/RecommendedCarousel.tsx
new file mode 100644
index 0000000..d1212d9
--- /dev/null
+++ b/app/components/Discovery/RecommendedCarousel.tsx
@@ -0,0 +1,26 @@
+"use client";
+
+import { ENDPOINTS } from "#/api/config";
+import { useSWRfetcher } from "#/api/utils";
+import { useUserStore } from "#/store/auth";
+import { ReleaseCourusel } from "../ReleaseCourusel/ReleaseCourusel";
+import useSWR from "swr";
+
+export const RecommendedCarousel = () => {
+ const token = useUserStore((state) => state.token);
+ const { data, isLoading, error } = useSWR(
+ `${ENDPOINTS.discover.recommendations}/-1?previous_page=-1${token ? `&token=${token}` : ""}`,
+ useSWRfetcher,
+ {
+ revalidateOnFocus: false,
+ revalidateIfStale: false,
+ revalidateOnReconnect: false,
+ }
+ );
+
+ if (!token) return <>>;
+ if (error) return <>>;
+ if (isLoading) return <>>;
+
+ return ;
+};
diff --git a/app/pages/Discover.tsx b/app/pages/Discover.tsx
index b36e430..e75d63b 100644
--- a/app/pages/Discover.tsx
+++ b/app/pages/Discover.tsx
@@ -2,6 +2,7 @@
import { CollectionsOfTheWeek } from "#/components/Discovery/CollectionsOfTheWeek";
import { DiscussingToday } from "#/components/Discovery/DiscussingToday";
import { InterestingCarousel } from "#/components/Discovery/InterestingCarousel";
+import { RecommendedCarousel } from "#/components/Discovery/RecommendedCarousel";
import { WatchingNowCarousel } from "#/components/Discovery/WatchingNowCarousel";
import { Button } from "flowbite-react";
@@ -27,6 +28,7 @@ export const DiscoverPage = () => {
Фильтр
+