+ {messaggioCorrente.immagineURL && (
+
+ )}
{messaggioCorrente.testo}
da {messaggioCorrente.autore}
-
- {timeLeft}
+
+ {debug && (
+
+
+ {timeLeft}
+
+ )}
);
};
diff --git a/src/index.js b/src/index.js
index bf95bd0..6b34db0 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,13 +1,8 @@
-import React, { useEffect, useState } from "react";
+import React from "react";
import ReactDOM from "react-dom/client";
import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom";
import firebase from "firebase/app";
import "firebase/database";
-import TextField from "@mui/material/TextField";
-import { Stack } from "@mui/system";
-import { Button } from "@mui/material";
-import { useForm } from "react-hook-form";
-import Countdown from "./Countdown";
import List from "@mui/material/List";
import ListItem from "@mui/material/ListItem";
@@ -15,69 +10,23 @@ import ListItemButton from "@mui/material/ListItemButton";
import ListItemText from "@mui/material/ListItemText";
import Checkbox from "@mui/material/Checkbox";
import { Proiezione } from "./Proiezione";
-
-export const MyForm = () => {
- const [mandato, cambiaMandato] = useState(false);
- const { register, handleSubmit } = useForm();
- const onSubmit = ({ testo, autore }) => {
- var postListRef = firebase.database().ref("messaggi");
- var newPostRef = postListRef.push();
- console.log(newPostRef.key);
- newPostRef.set({
- id: newPostRef.key,
- autore,
- testo,
- timestamp: firebase.database.ServerValue.TIMESTAMP,
- approvato: true,
- });
- cambiaMandato(true);
- };
-
- if (mandato) {
- return (
-