From 0134b64ca04131da003ceecb9289d7cf75dce78f Mon Sep 17 00:00:00 2001 From: Jerald-Golden-B Date: Tue, 13 May 2025 18:43:18 +0530 Subject: [PATCH] Remove redundant rating validation logic from AssetPreview component --- app/src/modules/market/AssetPreview.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/app/src/modules/market/AssetPreview.tsx b/app/src/modules/market/AssetPreview.tsx index 8f4eaf8..c2bb0d9 100644 --- a/app/src/modules/market/AssetPreview.tsx +++ b/app/src/modules/market/AssetPreview.tsx @@ -41,17 +41,8 @@ function Ui() { const AssetPreview: React.FC = ({ selectedCard, setSelectedCard, - modelUrl + modelUrl, }) => { - // Ensure rating is a valid number between 0 and 5 - const rating = Math.max( - 0, - Math.min(5, isNaN(selectedCard.rating) ? 0 : selectedCard.rating) - ); - - // Ensure that the rating is a valid positive integer for array length - const starsArray = Array.from({ length: rating }, (_, index) => index); - return (