🚧 wip: add recommendation component
This commit is contained in:
13
features/home/sections/Recommendation/main.tsx
Normal file
13
features/home/sections/Recommendation/main.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import { getRecommendationAnimeAction } from "../../actions/getRecommenationAnime";
|
||||
|
||||
const RecommendationMain = async () => {
|
||||
const data = async () => await getRecommendationAnimeAction();
|
||||
const result = await data();
|
||||
return (
|
||||
<div>
|
||||
<div>{JSON.stringify(result)}</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default RecommendationMain;
|
||||
5
features/home/sections/Recommendation/skeleton.tsx
Normal file
5
features/home/sections/Recommendation/skeleton.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
const RecommendationSkeleton = () => {
|
||||
return <div>loading...</div>;
|
||||
};
|
||||
|
||||
export default RecommendationSkeleton;
|
||||
20
features/home/sections/Recommendation/wrapper.tsx
Normal file
20
features/home/sections/Recommendation/wrapper.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
import { Suspense } from "react";
|
||||
import RecommendationMain from "./main";
|
||||
import RecommendationSkeleton from "./skeleton";
|
||||
import { getRecommendationAnimeAction } from "../../actions/getRecommenationAnime";
|
||||
|
||||
const Recommendation = async () => {
|
||||
return (
|
||||
<div className="mt-12">
|
||||
<h1 className="text-2xl text-neutral-100 font-semibold w-fit">
|
||||
Maybe You Like
|
||||
<div className="w-full h-0.5 bg-primary -mt-1.5" />
|
||||
</h1>
|
||||
<Suspense fallback={<RecommendationSkeleton />}>
|
||||
<RecommendationMain />
|
||||
</Suspense>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Recommendation;
|
||||
Reference in New Issue
Block a user