katoikia-app/web-ui/web-react/src/AppTopbar.js

67 lines
2.4 KiB
JavaScript
Raw Normal View History

2022-07-14 21:03:52 +00:00
import React from 'react';
2022-07-06 04:15:11 +00:00
import { Link } from 'react-router-dom';
import classNames from 'classnames';
2022-08-11 06:55:45 +00:00
import Cookies from 'universal-cookie';
const cookies = new Cookies();
2022-07-06 04:15:11 +00:00
export const AppTopbar = (props) => {
2022-07-25 04:38:48 +00:00
return (
<div className="layout-topbar">
<Link to="/" className="layout-topbar-logo">
<img src={'assets/layout/images/logo-dark.svg'} alt="logo" />
<span>KATOIKIA</span>
</Link>
2022-07-06 04:15:11 +00:00
2022-08-11 06:55:45 +00:00
function cerrarSesion() {
cookies.remove('id', { path: "/" });
cookies.remove('email', { path: "/" });
cookies.remove('name', { path: "/" });
cookies.remove('type', { path: "/" });
cookies.remove('community_id', { path: "/" });
window.location.href = '/login';
}
2022-07-06 04:15:11 +00:00
return (
<div className="layout-topbar">
<Link to="/" className="layout-topbar-logo">
2022-07-14 21:03:52 +00:00
<img src={'assets/layout/images/logo-dark.svg' } alt="logo" />
2022-07-06 04:15:11 +00:00
<span>KATOIKIA</span>
</Link>
{/* <button type="button" className="p-link layout-menu-button layout-topbar-button" onClick={props.onToggleMenuClick}>
<i className="pi pi-bars"/>
</button> */}
2022-07-25 04:38:48 +00:00
<button
type="button"
className="p-link layout-topbar-menu-button layout-topbar-button"
>
<i className="pi pi-ellipsis-v" />
</button>
2022-07-06 04:15:11 +00:00
2022-07-25 04:38:48 +00:00
<ul className="layout-topbar-menu lg:flex origin-top">
{/* <li>
2022-07-06 04:15:11 +00:00
<button className="p-link layout-topbar-button" onClick={props.onMobileSubTopbarMenuClick}>
<i className="pi pi-calendar"/>
<span>Events</span>
</button>
</li> */}
2022-07-25 04:38:48 +00:00
{/* <li>
2022-07-06 04:15:11 +00:00
<button className="p-link layout-topbar-button" onClick={props.onMobileSubTopbarMenuClick}>
<i className="pi pi-cog"/>
<span>Settings</span>
</button>
</li> */}
2022-07-14 21:03:52 +00:00
<li>
<button className="p-link layout-topbar-button" >
<i className="pi pi-user" />
<span>Profile</span>
</button>
2022-08-11 06:55:45 +00:00
<button type="button" onClick={() => cerrarSesion()}>Logout</button>
2022-07-14 21:03:52 +00:00
</li>
</ul>
2022-07-06 04:15:11 +00:00
</div>
);
}