diff --git a/public/index.html b/public/index.html index aa069f2..32bc68e 100644 --- a/public/index.html +++ b/public/index.html @@ -24,7 +24,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - React App + Permiso de Construcción Digital | PI-ATI-ORT diff --git a/src/App.css b/src/App.css index 0a81a04..8f161d6 100644 --- a/src/App.css +++ b/src/App.css @@ -4,4 +4,12 @@ .verde-idem { color: #5CBE81; -} \ No newline at end of file + } + +.text-idem { + color: #5CBE81; + } + +.border-idem { + border-color: #5CBE81; + } \ No newline at end of file diff --git a/src/App.js b/src/App.js index 087309b..2795880 100644 --- a/src/App.js +++ b/src/App.js @@ -4,8 +4,10 @@ import "./App.css"; import Header from "./components/general/Header"; import Home from "./components/home/Layout"; -// import Login from "./components/login/Layout"; +import Login from "./components/login/Layout"; import Register from "./components/register/Layout"; +import Profile from "./components/profile/Layout"; +import NotFound from "./components/general/NotFound"; function App() { return ( @@ -16,8 +18,10 @@ function App() { } /> - {/* } /> */} + } /> } /> + } /> + } /> diff --git a/src/api/apiService.js b/src/api/apiService.js index 77eda53..892cb23 100644 --- a/src/api/apiService.js +++ b/src/api/apiService.js @@ -12,4 +12,26 @@ export const registerUser = async (user) => { console.error("Error registering user:", error); throw error; } -}; \ No newline at end of file +}; + +export const loginUser = async (user) => { + try { + const response = await axios.post("http://localhost:8080/auth/login", user); + return response.data; + } catch (error) { + console.error("Error login in: ", error); + throw error; + } +}; + +export const getUser = async (username) => { + try { + const response = await axios.get( + `http://localhost:8080/users/${username}` + ); + return response.data; + } catch (error) { + console.error("Error getting user: ", error); + throw error; + } +} diff --git a/src/components/general/Header.js b/src/components/general/Header.js index 6cc1068..ea606c7 100644 --- a/src/components/general/Header.js +++ b/src/components/general/Header.js @@ -4,18 +4,59 @@ import "./header.css"; import logo from "../../images/logo_imm.png"; const Header = () => { - const goToHome = (e) => { e.preventDefault(); window.location.href = "/"; - } - + }; + return ( -
-