From 1d08d197dcbff549c15f9d30c0e928ac3e710edc Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 18 Mar 2026 14:54:01 +0100 Subject: [PATCH] refactor: restructure application components and update routing --- jsconfig.json | 9 +++++++ src/App.jsx | 42 ++++++++++++++++++++++++++++++++ src/components/App.jsx | 43 --------------------------------- src/components/Footer.jsx | 6 +++-- src/main.jsx | 4 +-- src/pages/Home/Home.jsx | 12 ++++----- src/pages/Projects/Projects.jsx | 2 +- vite.config.js | 8 +++++- 8 files changed, 71 insertions(+), 55 deletions(-) create mode 100644 jsconfig.json create mode 100644 src/App.jsx delete mode 100644 src/components/App.jsx diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..30e99a0 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["src/*"] + } + }, + "include": ["src"] + } \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx new file mode 100644 index 0000000..dafc3f5 --- /dev/null +++ b/src/App.jsx @@ -0,0 +1,42 @@ +import '@/css/App.css' +import 'bootstrap/dist/css/bootstrap.min.css' +import 'bootstrap/dist/js/bootstrap.bundle.min.js' + +import Home from '@/pages/Home/Home.jsx' +import Projects from '@/pages/Projects/Projects.jsx' + +import Header from '@/components/Header.jsx' +import Link from '@/components/Link.jsx' +import NavBar from '@/components/NavBar.jsx' +import Footer from '@/components/Footer.jsx' +import { Routes, Route } from 'react-router-dom' + +const App = () => { + + const getCurrentYear = () => { + const start = new Date('2022-09-10'); + const now = new Date(); + + const delta = now.getFullYear() - start.getFullYear(); + const septemberOrLater = now.getMonth() >= 8; + + return delta + (septemberOrLater ? 1 : 0); + }; + + return ( + <> +
+ + Inicio + Proyectos + + + } /> + } /> + +