mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-05 15:44:21 +00:00
Fix more lint issues
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user