Skip to content

Commit

Permalink
Merge pull request #30 from Itera/spa-topbar
Browse files Browse the repository at this point in the history
Spa topbar
  • Loading branch information
hjaltipc authored Aug 24, 2023
2 parents 06216c3 + 3929ecf commit cde683a
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 2 deletions.
18 changes: 18 additions & 0 deletions spa/web/src/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { NavLink } from "react-router-dom";
import "./navbar.css";
import ExplorerLogo from "./assets/ExploreLogo.svg"
import Persona from "./assets/Persona.png"

function Navbar() {
return(
<nav className="Navbar-container">
<NavLink to="/"><img src={ExplorerLogo} alt="Explorer Logo"/></NavLink>
<NavLink to="/" className="Navbar-title">
SPA
</NavLink>
<NavLink to="/"><img src={Persona} alt="Profile Picture" width={50}/></NavLink>
</nav>
)
}

export default Navbar;
4 changes: 4 additions & 0 deletions spa/web/src/assets/ExploreLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spa/web/src/assets/Persona.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions spa/web/src/navbar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.Navbar-container{
position: sticky;
top:0;
display: flex;
align-items: center;
justify-content: space-evenly;
width: 100%;
background-color: #0a2242;
}
.Navbar-title{
color: white;
font-size: 5em;
}
6 changes: 5 additions & 1 deletion spa/web/src/pages/ConfirmationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { Guest, Room } from 'cms-types';
import { useEffect } from 'react';
import useAccessToken from '../auth/useAccessToken';
import { useGet } from '../hooks/useGet';
import { useLocation } from 'react-router-dom'
import { useLocation } from 'react-router-dom';
import Navbar from '../Navbar';

const ConfirmationPage = () => {
const { accounts } = useMsal();
Expand Down Expand Up @@ -61,6 +62,8 @@ const ConfirmationPage = () => {
}, [guest, account, accessToken, mutate, isLoading]);

return (
<div>
<Navbar/>
<Flex
width="100vw"
height="100vh"
Expand Down Expand Up @@ -105,6 +108,7 @@ const ConfirmationPage = () => {
</Card>
</Box>
</Flex>
</div>
);
};

Expand Down
4 changes: 4 additions & 0 deletions spa/web/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Guest, Room } from 'cms-types';
import { useEffect } from 'react';
import useAccessToken from '../auth/useAccessToken';
import { useGet } from '../hooks/useGet';
import Navbar from '../Navbar';
import { useNavigate } from 'react-router-dom';


Expand Down Expand Up @@ -69,6 +70,8 @@ const Home = () => {
}, [guest, account, accessToken, mutate, isLoading]);

return (
<div>
<Navbar/>
<Flex
width="100vw"
height="100vh"
Expand Down Expand Up @@ -111,6 +114,7 @@ const Home = () => {
</Button>
</Box>
</Flex>
</div>
);
};

Expand Down
5 changes: 4 additions & 1 deletion spa/web/src/pages/TreatmentPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useEffect, useState } from 'react';
import useAccessToken from '../auth/useAccessToken';
import { useGet } from '../hooks/useGet';
import { useNavigate } from 'react-router-dom';
import Navbar from '../Navbar';
import hydrotherapyImage from '../assets/images/hydrotherapy.png';
import mudbathImage from '../assets/images/mudbath.png';
import saunaImage from '../assets/images/sauna.png';
Expand Down Expand Up @@ -82,11 +83,12 @@ const TreatmentPage = () => {
}, [guest, account, accessToken, mutate, isLoading]);

return (
<div>
<Navbar/>
<Flex
width="100vw"
height="100vh"
alignContent="center"
justifyContent="center"
flexDirection="column"
backgroundColor="#f0f0f0"
>
Expand Down Expand Up @@ -360,6 +362,7 @@ const TreatmentPage = () => {

</Box>
</Flex>
</div>
);
};

Expand Down

0 comments on commit cde683a

Please sign in to comment.