classify web

This commit is contained in:
Husanjonazamov
2026-02-24 12:52:49 +05:00
commit 64af77101f
310 changed files with 45449 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
import { t } from '@/utils';
import RatingsSummary from '../Reviews/RatingsSummary';
import SellerReviewCard from "@/components/PagesComponent/Reviews/SellerReviewCard";
import { Button } from '@/components/ui/button';
import NoData from '@/components/EmptyStates/NoData';
const SellerRating = ({ ratingsData, seller, isLoadMoreReview, reviewHasMore, reviewCurrentPage, getSeller }) => {
return (
ratingsData?.data?.length > 0 ?
<>
<RatingsSummary averageRating={seller?.average_rating} reviews={ratingsData?.data} />
<div className='flex flex-col gap-4 bg-muted p-4 rounded-lg'>
{ratingsData?.data?.map((rating) => (
<SellerReviewCard key={rating.id} rating={rating} />
))}
{
ratingsData?.data?.length > 0 && reviewHasMore && (
<div className="text-center">
<Button
variant="outline"
className="text-sm sm:text-base text-primary w-[256px]"
disabled={isLoadMoreReview}
onClick={() => getSeller(reviewCurrentPage + 1)}
>
{isLoadMoreReview ? t("loading") : t("loadMore")}
</Button>
</div>
)
}
</div>
</>
:
<NoData name={t('reviews')} />
);
};
export default SellerRating;