Fix more lint issues

This commit is contained in:
2025-05-23 23:29:29 +02:00
parent 2519d46061
commit 623f619f88
2 changed files with 6 additions and 5 deletions

View File

@@ -17,6 +17,7 @@ import {
import { useAuth } from '../../contexts/AuthContext';
import AccountSettings from '../settings/account/AccountSettings';
import AdminDashboard from '../settings/admin/AdminDashboard';
import { UserRole } from '@/types/models';
const UserMenu: React.FC = () => {
const [accountSettingsOpened, setAccountSettingsOpened] =
@@ -90,7 +91,7 @@ const UserMenu: React.FC = () => {
</Group>
</UnstyledButton>
{user?.role === 'admin' && (
{user?.role === UserRole.Admin && (
<UnstyledButton
onClick={() => {
setAdminDashboardOpened(true);
@@ -116,7 +117,7 @@ const UserMenu: React.FC = () => {
)}
<UnstyledButton
onClick={handleLogout}
onClick={() => void handleLogout}
px="sm"
py="xs"
color="red"

View File

@@ -50,7 +50,7 @@ const WorkspaceSwitcher: React.FC = () => {
newWorkspace: Workspace
): Promise<void> => {
await loadWorkspaces();
switchWorkspace(newWorkspace.name);
await switchWorkspace(newWorkspace.name);
};
return (
@@ -67,7 +67,7 @@ const WorkspaceSwitcher: React.FC = () => {
onClick={() => {
setPopoverOpened((o) => !o);
if (!popoverOpened) {
loadWorkspaces();
void loadWorkspaces();
}
}}
>
@@ -128,7 +128,7 @@ const WorkspaceSwitcher: React.FC = () => {
<UnstyledButton
style={{ flex: 1 }}
onClick={() => {
switchWorkspace(workspace.name);
void switchWorkspace(workspace.name);
setPopoverOpened(false);
}}
>