From 64ac52232c349e00d9e06c4a173ebff4006d79a1 Mon Sep 17 00:00:00 2001 From: Michael Rooplall Date: Fri, 13 Dec 2024 02:50:06 -0500 Subject: [PATCH] Add thumbnail images to the Robots page --- app/Robots/[robot]/MediaContainer.js | 1 - app/Robots/[robot]/page.js | 157 ++++++++++++++++--------- app/Robots/[robot]/page.module.css | 16 ++- app/components/RobotItem/RobotItem.jsx | 40 +++++-- 4 files changed, 144 insertions(+), 70 deletions(-) diff --git a/app/Robots/[robot]/MediaContainer.js b/app/Robots/[robot]/MediaContainer.js index ce9954f..dbb919b 100644 --- a/app/Robots/[robot]/MediaContainer.js +++ b/app/Robots/[robot]/MediaContainer.js @@ -16,7 +16,6 @@ const MediaContainer = ({robotItem}) => { dynamicHeight={false} preventMovementUntilSwipeScrollTolerance={true} swipeScrollTolerance={50} - showThumbs={true} style={{ position: 'relative', display: 'flex', diff --git a/app/Robots/[robot]/page.js b/app/Robots/[robot]/page.js index 81b8207..4a2fadc 100644 --- a/app/Robots/[robot]/page.js +++ b/app/Robots/[robot]/page.js @@ -1,6 +1,7 @@ "use client" import styles from './page.module.css' import { useState, useEffect } from 'react' +import Image from 'next/image'; import Navbar from '@components/Navbar/Navbar' import Footer from '@components/Footer/Footer' @@ -44,6 +45,66 @@ const EventItem = ({eventData}) => { ) } +const RobotNavigationButtons = ({visible, previousRobotItem, nextRobotItem}) => { + return ( +
+ + + + + + + + Previous Robot + + + + + + + Next Robot + + + + + + + +
+ ) +} export default function Robot({params}) { @@ -67,9 +128,40 @@ export default function Robot({params}) { }, []) if (robotData == null){ - return - Loading - + return ( +
+
+ The Sentinels Logo + + Loading + +
+
+ ) } const {robotItem, previousRobotItem, nextRobotItem} = (() => { @@ -89,7 +181,8 @@ export default function Robot({params}) {
+

{robotItem.name}

@@ -190,60 +284,7 @@ export default function Robot({params}) {
-
- - - - - - - - Previous Robot - - - - - - - Next Robot - - - - - - - -
+