|
Last change
on this file since c4c43f3 was 8c01a1f, checked in by Andrej <asumanovski@…>, 5 months ago |
|
Made investing tab and adding assets, starting training tracking and adding training sessions
|
-
Property mode
set to
100644
|
|
File size:
2.0 KB
|
| Line | |
|---|
| 1 | import React from "react";
|
|---|
| 2 | import { Link } from "react-router-dom";
|
|---|
| 3 |
|
|---|
| 4 | import { MdLogout } from "react-icons/md";
|
|---|
| 5 |
|
|---|
| 6 | import logo from "../../../assets/logo.png";
|
|---|
| 7 |
|
|---|
| 8 | const DashboardTopbar = ({ username, onLogout }) => {
|
|---|
| 9 | return (
|
|---|
| 10 | <>
|
|---|
| 11 | {/* Desktop */}
|
|---|
| 12 | <div className="sticky top-0 z-30 hidden min-h-16 w-full items-center border-b border-base-300 bg-base-100 px-6 lg:flex lg:px-8">
|
|---|
| 13 | <div className="mx-auto grid size-full grid-cols-1 items-center justify-end justify-items-end gap-4 lg:grid-cols-[1fr_max-content] lg:justify-between lg:justify-items-stretch">
|
|---|
| 14 | <div className="flex items-center gap-3"></div>
|
|---|
| 15 |
|
|---|
| 16 | <div className="flex items-center gap-3">
|
|---|
| 17 | <span className="text-sm opacity-80">{username || "—"}</span>
|
|---|
| 18 | <button
|
|---|
| 19 | type="button"
|
|---|
| 20 | className="btn btn-ghost btn-sm"
|
|---|
| 21 | onClick={onLogout}
|
|---|
| 22 | aria-label="Log out"
|
|---|
| 23 | title="Log out"
|
|---|
| 24 | >
|
|---|
| 25 | <MdLogout className="size-5" />
|
|---|
| 26 | </button>
|
|---|
| 27 | </div>
|
|---|
| 28 | </div>
|
|---|
| 29 | </div>
|
|---|
| 30 |
|
|---|
| 31 | {/* Mobile */}
|
|---|
| 32 | <div className="fixed left-0 right-0 top-0 z-30 flex min-h-16 w-full items-center justify-between border-b border-base-300 bg-base-100 px-6 lg:hidden">
|
|---|
| 33 | <div className="flex items-center gap-4">
|
|---|
| 34 | <Link
|
|---|
| 35 | to="/dashboard"
|
|---|
| 36 | className="flex items-center gap-3"
|
|---|
| 37 | aria-label="Trekr dashboard"
|
|---|
| 38 | >
|
|---|
| 39 | <img src={logo} alt="Trekr" className="h-10 w-auto rounded-2xl" />
|
|---|
| 40 | </Link>
|
|---|
| 41 | </div>
|
|---|
| 42 | <div className="flex items-center gap-3">
|
|---|
| 43 | <span className="text-sm opacity-80">{username || "—"}</span>
|
|---|
| 44 | <button
|
|---|
| 45 | type="button"
|
|---|
| 46 | className="btn btn-ghost btn-sm"
|
|---|
| 47 | onClick={onLogout}
|
|---|
| 48 | aria-label="Log out"
|
|---|
| 49 | title="Log out"
|
|---|
| 50 | >
|
|---|
| 51 | <MdLogout className="size-5" />
|
|---|
| 52 | </button>
|
|---|
| 53 | </div>
|
|---|
| 54 | </div>
|
|---|
| 55 | </>
|
|---|
| 56 | );
|
|---|
| 57 | };
|
|---|
| 58 |
|
|---|
| 59 | export default DashboardTopbar;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.