backend for queues & minor front tweaks
This commit is contained in:
@ -1,11 +1,17 @@
|
||||
import { LogoutOutlined, UserOutlined } from "@ant-design/icons";
|
||||
import { Button, Layout, Menu, MenuProps, Popover, Tooltip } from "antd";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import {
|
||||
DesktopOutlined,
|
||||
LogoutOutlined,
|
||||
SettingOutlined,
|
||||
UserOutlined,
|
||||
} from "@ant-design/icons";
|
||||
import { Layout, Menu, MenuProps, Popover } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import AuthModal from "./AuthModal";
|
||||
import "./styles.css";
|
||||
import { StorePrototype, logOut, store } from "../config/store";
|
||||
import { useSelector } from "react-redux";
|
||||
import tr from "../config/translation";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
const { Header } = Layout;
|
||||
|
||||
@ -20,15 +26,27 @@ const HeaderComponent = () => {
|
||||
);
|
||||
|
||||
const userMenuItems: MenuProps["items"] = [
|
||||
{
|
||||
label: <Link to="/settings">{tr("Settings")}</Link>,
|
||||
key: "settings",
|
||||
icon: <SettingOutlined />,
|
||||
},
|
||||
{
|
||||
label: tr("Log out"),
|
||||
key: "logout",
|
||||
icon: <LogoutOutlined />,
|
||||
danger: true,
|
||||
onClick: () => store.dispatch(logOut()),
|
||||
},
|
||||
];
|
||||
|
||||
const items: MenuProps["items"] = [
|
||||
{
|
||||
label: <Link to={user ? "/dashboard" : "#"}>{tr("Dashboard")}</Link>,
|
||||
key: "dashboard",
|
||||
icon: <DesktopOutlined />,
|
||||
disabled: !user,
|
||||
},
|
||||
{
|
||||
label: user ? (
|
||||
<Popover
|
||||
|
||||
Reference in New Issue
Block a user