From 1083853a625bcd75c6b842747302fc496eb2a446 Mon Sep 17 00:00:00 2001 From: shiminc Date: Mon, 17 Jun 2024 11:23:16 +0100 Subject: [PATCH] photo dropdown listing --- frontend/src/components/PhotoSelection.jsx | 24 ++++++++++++++++++++++ frontend/src/components/ShowList.jsx | 14 +++++-------- 2 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 frontend/src/components/PhotoSelection.jsx diff --git a/frontend/src/components/PhotoSelection.jsx b/frontend/src/components/PhotoSelection.jsx new file mode 100644 index 0000000..d3760f4 --- /dev/null +++ b/frontend/src/components/PhotoSelection.jsx @@ -0,0 +1,24 @@ +import {useState} from 'react' + +/* +Display a drop-down list of photos to be shown. +*/ +function PhotoSelection (props) { + + + let listDisplayed = props.data.map(item => + ); + + + return( + <> + + + ) +} +export default PhotoSelection \ No newline at end of file diff --git a/frontend/src/components/ShowList.jsx b/frontend/src/components/ShowList.jsx index 2d223bc..5eb9512 100644 --- a/frontend/src/components/ShowList.jsx +++ b/frontend/src/components/ShowList.jsx @@ -1,5 +1,5 @@ import {useState} from 'react' - +import PhotoSelection from './PhotoSelection' /* Display a drop-down list of sessions for navigation. */ @@ -25,16 +25,12 @@ function ShowList(props) { fetch(url) .then(response => response.json()) .then(data => setPhotoFilenames(data)); - } - function PhotoList() { - console.log(photoFilenames); - return ( - - ) + } + + return ( <>

Photo Selection

@@ -45,7 +41,7 @@ function ShowList(props) { >