From f9d038825ee3b93ad1b485d5e006e25dc3703d65 Mon Sep 17 00:00:00 2001 From: Danilo Di Cuia Date: Fri, 6 Jan 2023 18:43:50 +0100 Subject: [PATCH] layout --- .gitignore | 2 ++ src/Galleria.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4d29575..c0d3a0d 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* + +*.mp4 \ No newline at end of file diff --git a/src/Galleria.js b/src/Galleria.js index 5f65f5e..c69141e 100644 --- a/src/Galleria.js +++ b/src/Galleria.js @@ -14,7 +14,7 @@ export const Galleria = () => { const { evento } = useParams(); const [messaggi, cambiaMessaggi] = useState([]); - const [indiceCorrente, cambiaindiceCorrente] = useState(1); + const [indiceCorrente, cambiaindiceCorrente] = useState(0); useEffect(() => { var messagesRef = firebase.database().ref(`/messaggi/${evento}`); @@ -85,7 +85,7 @@ export const Galleria = () => { )} - {indiceCorrente < messaggi.length && ( + {indiceCorrente < messaggi.length - 1 && ( cambiaindiceCorrente(indiceCorrente + 1)} >