Skip to content

Commit

Permalink
Tudo feito!
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-chagas committed Oct 18, 2024
1 parent d5a3ee2 commit d6d3cf2
Show file tree
Hide file tree
Showing 31 changed files with 295 additions and 271 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="pt-br">

<head>
<meta charset="utf-8" />
Expand Down
69 changes: 40 additions & 29 deletions src/crawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/firebaseConfig.js
Original file line number Diff line number Diff line change
@@ -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 = {
Expand All @@ -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
4 changes: 2 additions & 2 deletions src/pages/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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%" }}
>
<IconButton
aria-label="back"
onClick={() => navigate("/")}
onClick={() => navigate("/FicSpeak")}
sx={{ width: "50px", height: "50px" }}
>
<BackIcon />
Expand Down
8 changes: 4 additions & 4 deletions src/pages/create_character.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function Create() {
width: "70px",
height: "70px",
}}
onClick={() => navigate("/")}
onClick={() => navigate("/FicSpeak/")}
>
<BackIcon fontSize="inherit" />
</IconButton>
Expand Down Expand Up @@ -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) => (
<Grid item xs={12} sm={6} md={4} key={index}>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/custom/avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/custom/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/custom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/custom/personality.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/custom/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/custom/wallpaper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
});

Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/existent/avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/existent/character_universe.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/existent/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/existent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/existent/personality.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/existent/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/existent/wallpaper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
});

Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/famous/avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/famous/details.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/famous/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/famous/nacionality.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/famous/personality.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/famous/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/create_character/famous/wallpaper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
});

Expand Down
Loading

0 comments on commit d6d3cf2

Please sign in to comment.