From e993aac0e730400124aa8a24d4bb0dd8c6d11208 Mon Sep 17 00:00:00 2001 From: A i j a Z <72906651+Aijazmakerb@users.noreply.github.com> Date: Sun, 24 Sep 2023 20:01:48 +0530 Subject: fixed character card (#78) * fixed character card * Update components/anime/charactersCard.js Co-authored-by: Factiven * Update components/anime/charactersCard.js Co-authored-by: Factiven * Update components/anime/charactersCard.js Co-authored-by: Factiven --------- Co-authored-by: Factiven --- components/anime/charactersCard.js | 45 ++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 7 deletions(-) (limited to 'components') diff --git a/components/anime/charactersCard.js b/components/anime/charactersCard.js index 409c4b7..abff2ba 100644 --- a/components/anime/charactersCard.js +++ b/components/anime/charactersCard.js @@ -7,8 +7,8 @@ export default function Characters({ info }) { const [showAll, setShowAll] = useState(false); return ( -
-
+
+

Characters

{info?.length > 6 && (
setShowAll(!showAll)}> @@ -16,11 +16,12 @@ export default function Characters({ info }) {
)}
-
- {info?.slice(0, showAll ? info.length : 6).map((item, index) => { + {/* for bigger device */} +
+ {info.slice(0, showAll ? info.length : 6).map((item, index) => { return -
-
+
+
+ {/* for smaller devices */} +
+ {info.slice(0, showAll ? info.length : 6).map((item, index) => { + return + })} +
); } \ No newline at end of file -- cgit v1.2.3