|
|
|
|
@ -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 = () => {
|
|
|
|
|
<ArrowBackIcon style={{ fontSize: "3rem" }} /> |
|
|
|
|
</IconButton> |
|
|
|
|
)} |
|
|
|
|
{indiceCorrente < messaggi.length && ( |
|
|
|
|
{indiceCorrente < messaggi.length - 1 && ( |
|
|
|
|
<IconButton |
|
|
|
|
onClick={() => cambiaindiceCorrente(indiceCorrente + 1)} |
|
|
|
|
> |
|
|
|
|
|