This commit is contained in:
2025-10-06 23:08:28 +01:00
parent 6e697e40c1
commit 19ad8deb6f
8 changed files with 107 additions and 10 deletions

View File

@@ -1 +1 @@
VITE_API_URL=https://localhost:44329/
VITE_API_URL=https://localhost:7266/

View File

@@ -3,6 +3,9 @@ import { Toaster } from 'react-hot-toast';
import Home from './pages/Home';
import { Layout } from './layout/Layout';
import { useTheme } from './context/ThemeContext';
import NIF from './pages/NIF';
import CC from './pages/CC';
import NISS from './pages/NISS';
function App() {
const { theme } = useTheme();
@@ -12,9 +15,9 @@ function App() {
<Layout>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/NIF" />
<Route path="/NISS" />
<Route path="/CC" />
<Route path="/NIF" element={<NIF />} />
<Route path="/NISS" element={<NISS />} />
<Route path="/CC" element={<CC />} />
</Routes>
<Toaster position="top-right"
toastOptions={{

View File

@@ -25,7 +25,7 @@ export default function Footer() {
</Link>
</li>
<li>
<Link to="/geradores" className="hover:text-blue-500 dark:hover:text-blue-400 transition-colors duration-200">
<Link to="/home" className="hover:text-blue-500 dark:hover:text-blue-400 transition-colors duration-200">
Geradores
</Link>
</li>

View File

@@ -10,8 +10,9 @@ const navItems = [
{
name: "Geradores",
subItems: [
{ name: "Gerador de Senhas", path: "/geradores/senhas" },
{ name: "Gerador de Nomes", path: "/geradores/nomes" },
{ name: "Gerador de NIFs", path: "/NIF", },
{ name: "Gerador de NISS", path: "/NISS" },
{ name: "Gerador de CC", path: "/CC" },
],
},
{ name: "Contacto", path: "/contacto" },

View File

@@ -0,0 +1,31 @@
import { useEffect } from "react";
import { useLocation } from "react-router";
import GenerateCC from "../components/Geradores/Tipos/GenerateCC";
export default function CC() {
const location = useLocation();
// Efeito para rolar até a seção correspondente ao path
useEffect(() => {
const featuresSection = document.getElementById(location.hash.substring(1));
if (featuresSection) {
featuresSection.scrollIntoView({ behavior: "smooth" });
}
}, [location]);
return (
<div >
<div >
{/* Seção de Funcionalidades */}
<section id="features" className="py-16 px-4 md:px-8">
<div className="max-w-6xl mx-auto grid grid-cols-1">
<div id="nif">
<GenerateCC />
</div>
</div>
</section>
</div>
</div>
);
}

View File

@@ -28,9 +28,9 @@ export default function Home() {
<div id="niss">
<GenerateNISS />
</div>
<div id="cc">
<GenerateCC />
</div>
<div id="cc">
<GenerateCC />
</div>
</div>
</section>
</div>

View File

@@ -0,0 +1,31 @@
import { useEffect } from "react";
import { useLocation } from "react-router";
import GenerateNIF from "../components/Geradores/Tipos/GenerateNIF";
export default function NIF() {
const location = useLocation();
// Efeito para rolar até a seção correspondente ao path
useEffect(() => {
const featuresSection = document.getElementById(location.hash.substring(1));
if (featuresSection) {
featuresSection.scrollIntoView({ behavior: "smooth" });
}
}, [location]);
return (
<div >
<div >
{/* Seção de Funcionalidades */}
<section id="features" className="py-16 px-4 md:px-8">
<div className="max-w-6xl mx-auto grid grid-cols-1">
<div id="nif">
<GenerateNIF />
</div>
</div>
</section>
</div>
</div>
);
}

View File

@@ -0,0 +1,31 @@
import { useEffect } from "react";
import { useLocation } from "react-router";
import GenerateNISS from "../components/Geradores/Tipos/GenerateNISS";
export default function NISS() {
const location = useLocation();
// Efeito para rolar até a seção correspondente ao path
useEffect(() => {
const featuresSection = document.getElementById(location.hash.substring(1));
if (featuresSection) {
featuresSection.scrollIntoView({ behavior: "smooth" });
}
}, [location]);
return (
<div >
<div >
{/* Seção de Funcionalidades */}
<section id="features" className="py-16 px-4 md:px-8">
<div className="max-w-6xl mx-auto grid grid-cols-1">
<div id="nif">
<GenerateNISS />
</div>
</div>
</section>
</div>
</div>
);
}