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)}
>