Skip to content
Snippets Groups Projects
Commit 26709f86 authored by Antoine Gaudron-Desjardins's avatar Antoine Gaudron-Desjardins
Browse files

fix css

parent 0fc66c2c
No related branches found
No related tags found
1 merge request!39auth
Pipeline #44037 passed with warnings
REACT_APP_BASE_URL_BACK=http://localhost:3001/api
\ No newline at end of file
REACT_APP_BASE_URL_FRONT=http://localhost:3000
\ No newline at end of file
......@@ -26,11 +26,12 @@ export default function Header({ selection, setSelection }) {
}, [connected]);
return (
<div id="header-container">
<div id="header-container" style={!selection ? { flexDirection: "row" } : {}}>
<div id="header-restaurant-status">
{!selection
{width &&
(!selection
? "Accueil"
: `${selection.name} : actuellement ${selection.status ? "ouvert" : "fermé"}`}
: `${selection.name} : actuellement ${selection.status ? "ouvert" : "fermé"}`)}
</div>
<Link id="header-home-link" to="/" onClick={() => setSelection(null)}>
<h2>{width || !selection ? "Eatfast" : selection.name}</h2>
......@@ -44,6 +45,8 @@ export default function Header({ selection, setSelection }) {
)
) : user ? (
<BiLogOutCircle
id="header-button"
title="Déconnexion"
onClick={() => {
localStorage.removeItem("user");
window.location.assign(`${process.env.REACT_APP_BASE_URL_BACK}/auth/logout`);
......@@ -51,6 +54,8 @@ export default function Header({ selection, setSelection }) {
/>
) : (
<BiLogInCircle
id="header-button"
title="Connexion"
onClick={() => {
window.location.assign(`${process.env.REACT_APP_BASE_URL_BACK}/auth/login`);
}}
......
#header-container {
display: flex;
justify-content: space-between;
align-items: baseline;
align-items: center;
padding-left: 1rem;
padding-right: 1rem;
background-color: rgb(33, 37, 41);
......@@ -24,15 +24,20 @@
font-weight: lighter;
}
#header-button {
height: 2rem;
width: 2rem;
}
#header-button:hover {
cursor: pointer;
}
@media only screen and (max-width: 600px) {
#header-home-link > h2 {
font-size: 2rem;
}
#header-restaurant-status {
display: none;
}
#header-container {
flex-direction: column;
align-items: center;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment