diff --git a/React/package.json b/React/package.json index 6c4c64a..3a7f338 100644 --- a/React/package.json +++ b/React/package.json @@ -15,7 +15,7 @@ "tailwindcss": "^2.0.2" }, "scripts": { - "start": "set HTTPS=true; set SSL_CRT_FILE=cert.pem; set SSL_KEY_FILE=key.pem; react-scripts start", + "start": "set HTTPS=true set SSL_CRT_FILE=cert.pem set SSL_KEY_FILE=key.pem && react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" diff --git a/React/src/App.js b/React/src/App.js index 353fb3f..e790e4f 100644 --- a/React/src/App.js +++ b/React/src/App.js @@ -1,21 +1,21 @@ import React, { useEffect } from 'react'; -import { BrowserRouter as Router, Route, Switch } from 'react-router-dom' -import SigninOidc from './pages/signin-oidc' -import SignoutOidc from './pages/signout-oidc' -import Home from './pages/home' -import Login from './pages/login' +import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; +import SigninOidc from './pages/signin-oidc'; +import SignoutOidc from './pages/signout-oidc'; +import Home from './pages/home'; +import Login from './pages/login'; import { Provider } from 'react-redux'; import store from './store'; -import userManager, { loadUserFromStorage } from './services/userService' -import AuthProvider from './utils/authProvider' -import PrivateRoute from './utils/protectedRoute' +import userManager, { loadUserFromStorage } from './services/userService'; +import AuthProvider from './utils/authProvider'; +import PrivateRoute from './utils/protectedRoute'; +import './index.css'; function App() { - useEffect(() => { // fetch current user from cookies - loadUserFromStorage(store) - }, []) + loadUserFromStorage(store); + }, []); return ( diff --git a/React/src/images/logo.png b/React/src/images/logo.png deleted file mode 100644 index 51f8bb1..0000000 Binary files a/React/src/images/logo.png and /dev/null differ diff --git a/React/src/images/logo.svg b/React/src/images/logo.svg new file mode 100644 index 0000000..ea5bdda --- /dev/null +++ b/React/src/images/logo.svg @@ -0,0 +1,399 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/React/src/index.css b/React/src/index.css new file mode 100644 index 0000000..27df54d --- /dev/null +++ b/React/src/index.css @@ -0,0 +1,17 @@ +@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display&display=swap'); + +.bg-blue-custom { + background-color: #2170b9; +} + +.font-inter { + font-family: 'Inter', sans-serif; +} + +.font-playfair { + font-family: 'Playfair Display', serif; +} + +/* .text-blue-custom { + color: #2170b9; +} */ diff --git a/React/src/pages/components/Navbar.jsx b/React/src/pages/components/Navbar.jsx index 0b32a19..6e79ccc 100644 --- a/React/src/pages/components/Navbar.jsx +++ b/React/src/pages/components/Navbar.jsx @@ -1,11 +1,42 @@ -import React from 'react' -import logo from '../../images/logo.png' +import React from 'react'; +import logo from '../../images/logo.svg'; +import { Link } from 'react-router-dom'; +import { useSelector } from 'react-redux'; -const Navbar = ()=>( -
-
- logo -
+const Navbar = () => { + const user = useSelector((state) => state.auth.user); + + return ( +
+
-) -export default Navbar \ No newline at end of file + ); +}; +export default Navbar;