Skip to content

Commit 4ce79a1

Browse files
committed
Lint
1 parent 02a330d commit 4ce79a1

File tree

1 file changed

+29
-9
lines changed

1 file changed

+29
-9
lines changed

services/web/src/components/navBar/navBar.tsx

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@
1616
import "./nav.css";
1717

1818
import { Button, Dropdown, Menu, Avatar, Layout, Space } from "antd";
19-
import { LogoutOutlined, EditOutlined, ProfileOutlined, CaretDownOutlined } from "@ant-design/icons";
19+
import {
20+
LogoutOutlined,
21+
EditOutlined,
22+
ProfileOutlined,
23+
CaretDownOutlined,
24+
} from "@ant-design/icons";
2025
import React from "react";
2126
import roleTypes from "../../constants/roleTypes";
22-
import type { MenuProps } from 'antd';
27+
import type { MenuProps } from "antd";
2328
import { useNavigate } from "react-router-dom";
2429
import { connect, ConnectedProps } from "react-redux";
2530
import { logOutUserAction } from "../../actions/userActions";
@@ -68,9 +73,9 @@ const Navbar: React.FC<NavbarProps> = (props) => {
6873
else if (input.key === "forum") navigate(`/forum`);
6974
};
7075

71-
type MenuItem = Required<MenuProps>['items'][number];
76+
type MenuItem = Required<MenuProps>["items"][number];
7277

73-
const menuitems: MenuItem[] = []
78+
const menuitems: MenuItem[] = [];
7479
menuitems.push({ key: "dashboard", label: "Dashboard" });
7580
if (role !== roleTypes.ROLE_MECHANIC) {
7681
menuitems.push({ key: "shop", label: "Shop" });
@@ -86,11 +91,26 @@ const Navbar: React.FC<NavbarProps> = (props) => {
8691
/>
8792
);
8893

89-
const sideMenuItems: MenuProps['items'] = [
90-
{ key: "profile", label: "My Profile", onClick: () => navigate("/my-profile"), icon: <ProfileOutlined /> },
91-
{ key: "password", label: "Change Password", onClick: () => navigate("/reset-password"), icon: <EditOutlined /> },
92-
{ key: "logout", label: "Logout", onClick: logout, icon: <LogoutOutlined /> },
93-
]
94+
const sideMenuItems: MenuProps["items"] = [
95+
{
96+
key: "profile",
97+
label: "My Profile",
98+
onClick: () => navigate("/my-profile"),
99+
icon: <ProfileOutlined />,
100+
},
101+
{
102+
key: "password",
103+
label: "Change Password",
104+
onClick: () => navigate("/reset-password"),
105+
icon: <EditOutlined />,
106+
},
107+
{
108+
key: "logout",
109+
label: "Logout",
110+
onClick: logout,
111+
icon: <LogoutOutlined />,
112+
},
113+
];
94114

95115
return (
96116
<Header>

0 commit comments

Comments
 (0)