|
|
|
@ -3,17 +3,19 @@ import firebase from "firebase/app"; |
|
|
|
import { Button, Grid, Stack } from "@mui/material"; |
|
|
|
import { Button, Grid, Stack } from "@mui/material"; |
|
|
|
import videoSrc from "./video.mp4"; |
|
|
|
import videoSrc from "./video.mp4"; |
|
|
|
import logoSrc from "./logo.svg"; |
|
|
|
import logoSrc from "./logo.svg"; |
|
|
|
|
|
|
|
import { useParams } from "react-router-dom"; |
|
|
|
|
|
|
|
|
|
|
|
const SHOW_MESSAGE_TIME = 6000; |
|
|
|
const SHOW_MESSAGE_TIME = 6000; |
|
|
|
|
|
|
|
|
|
|
|
window.debug = false; |
|
|
|
window.debug = false; |
|
|
|
|
|
|
|
|
|
|
|
export const Proiezione = () => { |
|
|
|
export const Proiezione = () => { |
|
|
|
|
|
|
|
const { evento } = useParams(); |
|
|
|
const [messaggi, cambiaMessaggi] = useState([]); |
|
|
|
const [messaggi, cambiaMessaggi] = useState([]); |
|
|
|
const [messaggiApprovati, cambiaMessaggiApprovati] = useState([]); |
|
|
|
const [messaggiApprovati, cambiaMessaggiApprovati] = useState([]); |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
var messagesRef = firebase.database().ref("/messaggi"); |
|
|
|
var messagesRef = firebase.database().ref(`/messaggi/${evento}`); |
|
|
|
|
|
|
|
|
|
|
|
messagesRef.on("child_added", function (snapshot) { |
|
|
|
messagesRef.on("child_added", function (snapshot) { |
|
|
|
console.log("child_added"); |
|
|
|
console.log("child_added"); |
|
|
|
|