From d6d3cf241c90d1640fcde4ae157b3fe046b0939e Mon Sep 17 00:00:00 2001 From: pedro-chagas Date: Fri, 18 Oct 2024 10:35:16 -0300 Subject: [PATCH] Tudo feito! --- public/index.html | 2 +- src/crawler.js | 69 ++-- src/firebaseConfig.js | 4 +- src/pages/chat.js | 4 +- src/pages/create_character.js | 8 +- src/pages/create_character/custom/avatar.js | 2 +- src/pages/create_character/custom/history.js | 2 +- src/pages/create_character/custom/index.js | 2 +- .../create_character/custom/personality.js | 2 +- src/pages/create_character/custom/response.js | 2 +- .../create_character/custom/wallpaper.js | 2 +- src/pages/create_character/existent/avatar.js | 2 +- .../existent/character_universe.js | 2 +- .../create_character/existent/history.js | 2 +- src/pages/create_character/existent/index.js | 2 +- .../create_character/existent/personality.js | 2 +- .../create_character/existent/response.js | 2 +- .../create_character/existent/wallpaper.js | 2 +- src/pages/create_character/famous/avatar.js | 2 +- src/pages/create_character/famous/details.js | 2 +- src/pages/create_character/famous/index.js | 2 +- .../create_character/famous/nacionality.js | 2 +- .../create_character/famous/personality.js | 2 +- src/pages/create_character/famous/response.js | 2 +- .../create_character/famous/wallpaper.js | 2 +- src/pages/home.js | 341 +++++++++--------- src/pages/login/index.js | 2 +- src/pages/login/interests.js | 29 +- src/pages/login/name.js | 2 +- src/pages/not_found.js | 2 +- src/routes/router.js | 63 ++-- 31 files changed, 295 insertions(+), 271 deletions(-) diff --git a/public/index.html b/public/index.html index 5afa7c1..f141797 100644 --- a/public/index.html +++ b/public/index.html @@ -1,5 +1,5 @@ - + diff --git a/src/crawler.js b/src/crawler.js index 8932e40..b130c69 100644 --- a/src/crawler.js +++ b/src/crawler.js @@ -4,49 +4,60 @@ import { ref, uploadBytesResumable, getDownloadURL } from "firebase/storage"; import { useNavigate, useLocation } from "react-router-dom"; -const famousCharacters = [ +const famousCharacters = [ { - name: "Superman", - personality: "Nobre, altruísta e sempre busca fazer o bem.", - response: "Defende a verdade e a justiça, lutando para proteger a humanidade de qualquer ameaça.", - nacionality: "Kryptoniano", - details: "Kal-El, mais conhecido como Superman, é um dos heróis mais poderosos da DC, com habilidades como superforça, voo e visão de calor. Ele é um símbolo de esperança e justiça.", - wallpaper: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTmAQfQIae0C9Jbct9EI4kWGooVP-WdDh7IcQ&s", - avatar: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQl7SoGEkeaBeU0lZLk7DywwRESDzUVWWAvpg&s" + name: "Yuji Itadori", + personality: "Companheiro, altruísta e determinado.", + response: "Luta com todas as suas forças para proteger seus amigos e cumprir sua promessa de uma morte honrosa.", + nacionality: "Japonês", + details: "Yuji Itadori é um estudante que se torna um feiticeiro após consumir o dedo de Sukuna, o Rei das Maldições. Ele equilibra o poder de Sukuna dentro de si enquanto luta contra maldições.", + wallpaper: "https://c4.wallpaperflare.com/wallpaper/158/122/422/anime-anime-boys-jujutsu-kaisen-yuji-itadori-sakuna-hd-wallpaper-preview.jpg", + avatar: "https://i.pinimg.com/736x/9e/62/df/9e62df5524b53a18842ab3d3c8c173cb.jpg" }, { - name: "Batman", - personality: "Determinado, estrategista e movido pela justiça.", - response: "Usa sua inteligência e habilidades para combater o crime em Gotham City, sempre agindo com precisão e sem piedade com criminosos.", - nacionality: "Americano", - details: "Bruce Wayne, o Batman, usa sua riqueza e habilidades físicas e mentais para proteger Gotham como um vigilante. Ele não tem poderes, mas sua força, gadgets e inteligência o tornam um dos heróis mais temidos.", - wallpaper: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSoZYpqeZrJTUoizQMJyVSgR8MDISTh7hJezg&s", - avatar: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRC8WCjCmeO0-7MGinBFFHgqmkejuiy1lHhYw&s" + name: "Megumi Fushiguro", + personality: "Calmo, reservado e protetor.", + response: "Usa seu poder de invocação para combater maldições e proteger os mais fracos, seguindo sua própria justiça.", + nacionality: "Japonês", + details: "Megumi é um feiticeiro que usa técnicas de invocação sombria, manipulando shikigamis (espíritos) para lutar. Ele é um aliado próximo de Yuji e acredita que salvar as pessoas vale mais do que cumprir regras.", + wallpaper: "https://images8.alphacoders.com/133/1337441.png", + avatar: "https://i.pinimg.com/736x/93/f0/36/93f036d7375686c332dbfe32b5845f52.jpg" }, { - name: "Mulher-Maravilha", - personality: "Corajosa, compassiva e determinada a lutar pela paz.", - response: "Usa sua força e habilidades de combate para defender os inocentes e lutar pela justiça e igualdade.", - nacionality: "Amazona", - details: "Diana Prince, a Mulher-Maravilha, é uma guerreira Amazona com habilidades sobre-humanas, treinada para ser uma campeã do bem e da justiça.", - wallpaper: "https://wallpapers.com/images/hd/wonder-woman-running-raised-arm-dmd0qa82n9816vlc.jpg", - avatar: "https://www.beautyeditor.com.br/wp-content/uploads/2017/11/beleza-gal-gadot-maquiagem-corpo-mulher-maravilha.jpg" + name: "Nobara Kugisaki", + personality: "Confiante, teimosa e destemida.", + response: "Enfrenta as maldições sem medo, valorizando tanto sua força quanto sua aparência.", + nacionality: "Japonês", + details: "Nobara é uma feiticeira que usa uma técnica única baseada em bonecos de palha e martelos, permitindo que ela ataque as maldições de forma criativa. Ela luta ao lado de Yuji e Megumi.", + wallpaper: "https://images6.alphacoders.com/113/thumb-1920-1139591.jpg", + avatar: "https://i.pinimg.com/originals/85/19/67/851967be3b9fcca0670b6850b57904de.jpg" }, { - name: "Flash", - personality: "Divertido, otimista e cheio de energia.", - response: "Usa sua supervelocidade para ajudar os outros e lutar contra o crime rapidamente.", - nacionality: "Americano", - details: "Barry Allen, também conhecido como Flash, é o homem mais rápido do mundo, capaz de se mover a velocidades incríveis, viajar no tempo e vibrar através de objetos.", - wallpaper: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR7YMpH8hSskxj1GJxXh1gCiS9pKWYAzIT8uQ&s", - avatar: "https://sm.ign.com/ign_pt/news/t/the-flash-/the-flash-exclusive-behind-the-scenes-clip-from-the-musical_m3rw.jpg" + name: "Satoru Gojo", + personality: "Arrogante, brincalhão, mas incrivelmente poderoso e protetor.", + response: "Usa suas habilidades sobre-humanas para proteger seus alunos e combater maldições com confiança absoluta em sua força.", + nacionality: "Japonês", + details: "Gojo é o feiticeiro mais forte da série, mestre em técnicas de barreira e manipulação do espaço-tempo. Ele é professor de Yuji, Megumi e Nobara, e desafia a estrutura do mundo dos feiticeiros.", + wallpaper: "https://i.pinimg.com/originals/8e/71/58/8e71585181c09cd829f061ec2389bf9e.jpg", + avatar: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSac0EihZ4qDHvW8-gw42jMLCmQE4Vx5BMrNQ&s" }, + { + name: "Sukuna", + personality: "Cruel, sádico e implacável.", + response: "Despreza a humanidade e busca dominar o mundo, usando sua força devastadora para eliminar qualquer um que cruze seu caminho.", + nacionality: "Desconhecido (Antigo Rei das Maldições)", + details: "Sukuna, também conhecido como o Rei das Maldições, é uma entidade antiga e extremamente poderosa que reside dentro de Yuji Itadori. Ele está sempre em conflito com Yuji, aguardando o momento certo para tomar o controle total.", + wallpaper: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRcRd5nZn0wmv5tztlRYeSFjorNwy8IZP7Y_w&s", + avatar: "https://i.pinimg.com/736x/78/b4/d4/78b4d40ab57f2d51dd7c23888f086335.jpg" + } ]; + + function App() { const [loading, setLoading] = useState(false); const navigate = useNavigate(); diff --git a/src/firebaseConfig.js b/src/firebaseConfig.js index f603950..260b4ee 100644 --- a/src/firebaseConfig.js +++ b/src/firebaseConfig.js @@ -1,5 +1,5 @@ import { initializeApp } from "firebase/app"; -import { getFirestore, collection, getDocs, doc, getDoc, setDoc } from "firebase/firestore"; +import { getFirestore, collection, getDocs, doc, getDoc, setDoc, addDoc } from "firebase/firestore"; // Adicione addDoc aqui import { getStorage } from "firebase/storage"; // Importar Storage const firebaseConfig = { @@ -17,4 +17,4 @@ const firebaseApp = initializeApp(firebaseConfig); const db = getFirestore(firebaseApp); const storage = getStorage(firebaseApp); // Inicializa o Firebase Storage -export { db, storage, collection, getDocs, doc, getDoc, setDoc }; // Agora exporta também o storage +export { db, storage, collection, getDocs, doc, getDoc, setDoc, addDoc }; // Agora exporta também addDoc diff --git a/src/pages/chat.js b/src/pages/chat.js index d966359..68aa677 100644 --- a/src/pages/chat.js +++ b/src/pages/chat.js @@ -172,11 +172,11 @@ function App() { alignItems="center" padding="15px" boxSizing="border-box" - sx={{ background: (theme) => theme.palette.primary.main }} + sx={{ background: (theme) => theme.palette.primary.main,opacity:"90%" }} > navigate("/")} + onClick={() => navigate("/FicSpeak")} sx={{ width: "50px", height: "50px" }} > diff --git a/src/pages/create_character.js b/src/pages/create_character.js index a4c5170..d3de2d6 100644 --- a/src/pages/create_character.js +++ b/src/pages/create_character.js @@ -55,7 +55,7 @@ function Create() { width: "70px", height: "70px", }} - onClick={() => navigate("/")} + onClick={() => navigate("/FicSpeak/")} > @@ -88,19 +88,19 @@ function Create() { image: anonymous, title: "Criar seu próprio", subtitle: "personagem", - path: "/create/custom", + path: "/FicSpeak/create/custom", }, { image: messi, title: "Criar um personagem", subtitle: "famoso", - path: "/create/famous", + path: "/FicSpeak/create/famous", }, { image: luffy, title: "Criar personagem", subtitle: "existente", - path: "/create/existent", + path: "/FicSpeak/create/existent", }, ].map(({ image, title, subtitle, path }, index) => ( diff --git a/src/pages/create_character/custom/avatar.js b/src/pages/create_character/custom/avatar.js index ab69e98..9a11118 100644 --- a/src/pages/create_character/custom/avatar.js +++ b/src/pages/create_character/custom/avatar.js @@ -45,7 +45,7 @@ function App() { await setDoc(docRef, characterData); console.log("Character saved successfully!"); - navigate("/", { state: { createdCharacter: true } }); + navigate("/FicSpeak", { state: { createdCharacter: true } }); setLoading(false); // Encerra o loading } ); diff --git a/src/pages/create_character/custom/history.js b/src/pages/create_character/custom/history.js index fa04dd4..a1a41c7 100644 --- a/src/pages/create_character/custom/history.js +++ b/src/pages/create_character/custom/history.js @@ -10,7 +10,7 @@ function App() { const { state } = location; function next() { - navigate("/create/custom/wallpaper", { state: { ...state, history } }); + navigate("/FicSpeak/create/custom/wallpaper", { state: { ...state, history } }); } return ( diff --git a/src/pages/create_character/custom/index.js b/src/pages/create_character/custom/index.js index 07bf56b..8c5fea3 100644 --- a/src/pages/create_character/custom/index.js +++ b/src/pages/create_character/custom/index.js @@ -8,7 +8,7 @@ function App() { const navigate = useNavigate(); function next() { - navigate("/create/custom/response", { state: { name } }); + navigate("/FicSpeak/create/custom/response", { state: { name } }); } return ( diff --git a/src/pages/create_character/custom/personality.js b/src/pages/create_character/custom/personality.js index 4ed0a97..45beb86 100644 --- a/src/pages/create_character/custom/personality.js +++ b/src/pages/create_character/custom/personality.js @@ -10,7 +10,7 @@ function App() { const { state } = location; function next() { - navigate("/create/custom/history", { state: { ...state, personality } }); + navigate("/FicSpeak/create/custom/history", { state: { ...state, personality } }); } return ( diff --git a/src/pages/create_character/custom/response.js b/src/pages/create_character/custom/response.js index 2d478f7..6a954a9 100644 --- a/src/pages/create_character/custom/response.js +++ b/src/pages/create_character/custom/response.js @@ -10,7 +10,7 @@ function App() { const { state } = location; function next() { - navigate("/create/custom/personality", { state: { ...state, response } }); + navigate("/FicSpeak/create/custom/personality", { state: { ...state, response } }); } return ( diff --git a/src/pages/create_character/custom/wallpaper.js b/src/pages/create_character/custom/wallpaper.js index a7cd76b..d803354 100644 --- a/src/pages/create_character/custom/wallpaper.js +++ b/src/pages/create_character/custom/wallpaper.js @@ -34,7 +34,7 @@ function App() { console.log("Wallpaper URL:", wallpaperURL); setUploadedWallpaperURL(wallpaperURL); - navigate("/create/custom/avatar", { + navigate("/FicSpeak/create/custom/avatar", { state: { ...state, wallpaper: wallpaperURL }, }); diff --git a/src/pages/create_character/existent/avatar.js b/src/pages/create_character/existent/avatar.js index 9762f79..3827e41 100644 --- a/src/pages/create_character/existent/avatar.js +++ b/src/pages/create_character/existent/avatar.js @@ -46,7 +46,7 @@ function App() { await setDoc(docRef, characterData); console.log("Character saved successfully!"); - navigate("/", { state: { createdCharacter: true } }); + navigate("/FicSpeak", { state: { createdCharacter: true } }); setLoading(false); } ); diff --git a/src/pages/create_character/existent/character_universe.js b/src/pages/create_character/existent/character_universe.js index 594d817..44da050 100644 --- a/src/pages/create_character/existent/character_universe.js +++ b/src/pages/create_character/existent/character_universe.js @@ -10,7 +10,7 @@ function App() { const { state } = location; function next() { - navigate("/create/existent/wallpaper", { state: { ...state, universe: name } }); + navigate("/FicSpeak/create/existent/wallpaper", { state: { ...state, universe: name } }); } return ( diff --git a/src/pages/create_character/existent/history.js b/src/pages/create_character/existent/history.js index fb97038..d187a19 100644 --- a/src/pages/create_character/existent/history.js +++ b/src/pages/create_character/existent/history.js @@ -10,7 +10,7 @@ function App() { const { state } = location; function next() { - navigate("/create/existent/personality", { state: { ...state, history } }); + navigate("/FicSpeak/create/existent/personality", { state: { ...state, history } }); } return ( diff --git a/src/pages/create_character/existent/index.js b/src/pages/create_character/existent/index.js index 55f04e6..b95700a 100644 --- a/src/pages/create_character/existent/index.js +++ b/src/pages/create_character/existent/index.js @@ -10,7 +10,7 @@ function App() { const { state } = location; function next() { - navigate("/create/existent/history", { state: { ...state, name } }); + navigate("/FicSpeak/create/existent/history", { state: { ...state, name } }); } return ( diff --git a/src/pages/create_character/existent/personality.js b/src/pages/create_character/existent/personality.js index 25281ba..4ff2b67 100644 --- a/src/pages/create_character/existent/personality.js +++ b/src/pages/create_character/existent/personality.js @@ -10,7 +10,7 @@ function App() { const { state } = location; function next() { - navigate("/create/existent/response", { state: { ...state, personality } }); + navigate("/FicSpeak/create/existent/response", { state: { ...state, personality } }); } return ( diff --git a/src/pages/create_character/existent/response.js b/src/pages/create_character/existent/response.js index 84420aa..fa73e1c 100644 --- a/src/pages/create_character/existent/response.js +++ b/src/pages/create_character/existent/response.js @@ -10,7 +10,7 @@ function App() { const { state } = location; function next() { - navigate("/create/existent/universe", { state: { ...state, response: name } }); + navigate("/FicSpeak/create/existent/universe", { state: { ...state, response: name } }); } return ( diff --git a/src/pages/create_character/existent/wallpaper.js b/src/pages/create_character/existent/wallpaper.js index 57166e4..f5304cc 100644 --- a/src/pages/create_character/existent/wallpaper.js +++ b/src/pages/create_character/existent/wallpaper.js @@ -32,7 +32,7 @@ function App() { const wallpaperURL = await getDownloadURL(wallpaperRef); console.log("Wallpaper URL:", wallpaperURL); - navigate("/create/existent/avatar", { + navigate("/FicSpeak/create/existent/avatar", { state: { ...state, wallpaper: wallpaperURL }, }); diff --git a/src/pages/create_character/famous/avatar.js b/src/pages/create_character/famous/avatar.js index a68ad42..8576a13 100644 --- a/src/pages/create_character/famous/avatar.js +++ b/src/pages/create_character/famous/avatar.js @@ -47,7 +47,7 @@ function App() { await setDoc(docRef, characterData); console.log("Character saved successfully!"); - navigate("/", { state: { createdCharacter: true } }); + navigate("/FicSpeak", { state: { createdCharacter: true } }); setLoading(false); } ); diff --git a/src/pages/create_character/famous/details.js b/src/pages/create_character/famous/details.js index a02583d..a6096dd 100644 --- a/src/pages/create_character/famous/details.js +++ b/src/pages/create_character/famous/details.js @@ -10,7 +10,7 @@ function App() { const { state } = location; function next() { - navigate("/create/famous/nacionality", { state: { ...state, details: name } }); + navigate("/FicSpeak/create/famous/nacionality", { state: { ...state, details: name } }); } return ( diff --git a/src/pages/create_character/famous/index.js b/src/pages/create_character/famous/index.js index 7fc83ab..f7a5226 100644 --- a/src/pages/create_character/famous/index.js +++ b/src/pages/create_character/famous/index.js @@ -10,7 +10,7 @@ function App() { const { state } = location; function next() { - navigate("/create/famous/personality", { state: { ...state, name } }); + navigate("/FicSpeak/create/famous/personality", { state: { ...state, name } }); } return ( diff --git a/src/pages/create_character/famous/nacionality.js b/src/pages/create_character/famous/nacionality.js index e3d9d6e..8ba3f44 100644 --- a/src/pages/create_character/famous/nacionality.js +++ b/src/pages/create_character/famous/nacionality.js @@ -10,7 +10,7 @@ function App() { const { state } = location; function next() { - navigate("/create/famous/wallpaper", { state: { ...state, nacionality: name } }); + navigate("/FicSpeak/create/famous/wallpaper", { state: { ...state, nacionality: name } }); } return ( diff --git a/src/pages/create_character/famous/personality.js b/src/pages/create_character/famous/personality.js index 21e9343..e54d7b1 100644 --- a/src/pages/create_character/famous/personality.js +++ b/src/pages/create_character/famous/personality.js @@ -10,7 +10,7 @@ function App() { const { state } = location; function next() { - navigate("/create/famous/response", { state: { ...state, personality } }); + navigate("/FicSpeak/create/famous/response", { state: { ...state, personality } }); } return ( diff --git a/src/pages/create_character/famous/response.js b/src/pages/create_character/famous/response.js index 4abdd68..d9ce7b3 100644 --- a/src/pages/create_character/famous/response.js +++ b/src/pages/create_character/famous/response.js @@ -10,7 +10,7 @@ function App() { const { state } = location; function next() { - navigate("/create/famous/details", { state: { ...state, response: name } }); + navigate("/FicSpeak/create/famous/details", { state: { ...state, response: name } }); } return ( diff --git a/src/pages/create_character/famous/wallpaper.js b/src/pages/create_character/famous/wallpaper.js index 2ed6a0b..3779dca 100644 --- a/src/pages/create_character/famous/wallpaper.js +++ b/src/pages/create_character/famous/wallpaper.js @@ -34,7 +34,7 @@ function App() { console.log("Wallpaper URL:", wallpaperURL); // Navegar para a próxima tela, passando o estado atualizado - navigate("/create/famous/avatar", { + navigate("/FicSpeak/create/famous/avatar", { state: { ...state, wallpaper: wallpaperURL }, }); diff --git a/src/pages/home.js b/src/pages/home.js index 534a651..b3a4e3a 100644 --- a/src/pages/home.js +++ b/src/pages/home.js @@ -1,187 +1,188 @@ -import React, { useEffect, useState } from "react"; -import { - Stack, - Typography, - TextField, - InputAdornment, - Alert, - IconButton, - Card, - CardContent, - CardMedia, -} from "@mui/material"; -import SearchIcon from "@mui/icons-material/Search"; -import AddIcon from "@mui/icons-material/Add"; -import { useNavigate, useLocation } from "react-router-dom"; -import { db, collection, getDocs } from "../firebaseConfig"; + import React, { useEffect, useState } from "react"; + import { + Stack, + Typography, + TextField, + InputAdornment, + Alert, + IconButton, + Card, + CardContent, + CardMedia, + } from "@mui/material"; + import SearchIcon from "@mui/icons-material/Search"; + import AddIcon from "@mui/icons-material/Add"; + import { useNavigate, useLocation } from "react-router-dom"; + import { db, collection, getDocs } from "../firebaseConfig"; -function App() { - const location = useLocation(); - const { state } = location; - const characterCreated = state?.createdCharacter; - const navigate = useNavigate(); - const [showAlert, setShowAlert] = useState(false); - const [characters, setCharacters] = useState([]); + function App() { + const location = useLocation(); + const { state } = location; + const characterCreated = state?.createdCharacter; + const navigate = useNavigate(); + const [showAlert, setShowAlert] = useState(false); + const [characters, setCharacters] = useState([]); - useEffect(() => { - const fetchCharacters = async () => { - const charactersCollection = collection(db, "characters"); - const charactersSnapshot = await getDocs(charactersCollection); - const charactersList = charactersSnapshot.docs.map(doc => ({ - id: doc.id, - ...doc.data() - })); - setCharacters(charactersList); - }; + useEffect(() => { + const fetchCharacters = async () => { + const charactersCollection = collection(db, "characters"); + const charactersSnapshot = await getDocs(charactersCollection); + const charactersList = charactersSnapshot.docs.map(doc => ({ + id: doc.id, + ...doc.data() + })); + setCharacters(charactersList); + }; - fetchCharacters(); - }, []); + fetchCharacters(); + }, []); - useEffect(() => { - if (characterCreated) { - setShowAlert(true); - const timer = setTimeout(() => { - setShowAlert(false); - navigate(location.pathname); - }, 5000); + useEffect(() => { + if (characterCreated) { + setShowAlert(true); + const timer = setTimeout(() => { + setShowAlert(false); + navigate("FicSpeak/"+location.pathname); + }, 5000); - return () => clearTimeout(timer); - } else { - setShowAlert(false); - } - }, [characterCreated]); - - return ( - theme.palette.background.default, - margin: 0, - color: "#fff", - }} - > - {showAlert && ( - setShowAlert(false)}> - Personagem adicionado com sucesso! - - )} - - theme.palette.primary.main }} - > - - CONVERSAR - - {/* clearTimeout(timer); + } else { + setShowAlert(false); + } + }, [characterCreated]); + console.log(characters.length); + return ( + - - - ), + background: (theme) => theme.palette.background.default, + margin: 0, + color: "#fff", }} - /> */} - + > + {showAlert && ( + setShowAlert(false)}> + Personagem adicionado com sucesso! + + )} - - {characters.map((character) => ( - navigate(`/chat/${character.id}`)} - sx={{ - width: { xs: "150px", sm: "200px" }, // Tamanho responsivo dos cards - maxHeight: 210, - backgroundColor: "#222", - color: "#fff", - cursor: "pointer", - "&:hover": { - backgroundColor: "#333", - "& .MuiTypography-root": { - color: (theme) => - theme.palette.secondary.main, + theme.palette.primary.main }} + > + + CONVERSAR + + + {/* Uncomment if you want to add a search bar */} + {/* + + + ), + }} + /> */} + + + - - - ( + navigate(`/FicSpeak/chat/${character.id}`)} sx={{ - textAlign: "center", - overflow: "hidden", - textOverflow: "ellipsis", - whiteSpace: "nowrap", - fontSize: { xs: "14px", sm: "16px" }, // Tamanho responsivo do texto + width: "150px", // Largura responsiva + maxHeight: 240, // Altura máxima do card + backgroundColor: "#222", + color: "#fff", + cursor: "pointer", + "&:hover": { + backgroundColor: "#333", + "& .MuiTypography-root": { + color: (theme) => theme.palette.secondary.main, + }, + }, }} > - {character.name} - - - - ))} - + + + + {character.name} + + + + ))} + - theme.palette.secondary.main, - width: "60px", // Dimensão responsiva - height: "60px", - }} - onClick={() => navigate("/create")} - > - - - - ); -} + theme.palette.secondary.main, + width: { xs: '50px', sm: '60px' }, // Dimensão responsiva + height: { xs: '50px', sm: '60px' }, + }} + onClick={() => navigate("/FicSpeak/create")} + > + + + + ); + } -export default App; + export default App; \ No newline at end of file diff --git a/src/pages/login/index.js b/src/pages/login/index.js index 21e759b..05d520c 100644 --- a/src/pages/login/index.js +++ b/src/pages/login/index.js @@ -64,7 +64,7 @@ function App() {