mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 16:04:23 +00:00
Fix various eslint issues
This commit is contained in:
@@ -50,7 +50,7 @@ const DeleteAccountModal: React.FC<DeleteAccountModalProps> = ({
|
||||
<Button
|
||||
color="red"
|
||||
onClick={() => {
|
||||
onConfirm(password);
|
||||
void onConfirm(password);
|
||||
setPassword('');
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -48,7 +48,7 @@ const EmailPasswordModal: React.FC<EmailPasswordModalProps> = ({
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
onConfirm(password);
|
||||
void onConfirm(password);
|
||||
setPassword('');
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -42,7 +42,7 @@ const CreateFileModal: React.FC<CreateFileModalProps> = ({ onCreateFile }) => {
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button onClick={handleSubmit}>Create</Button>
|
||||
<Button onClick={() => void handleSubmit()}>Create</Button>
|
||||
</Group>
|
||||
</Box>
|
||||
</Modal>
|
||||
|
||||
@@ -28,7 +28,7 @@ const DeleteFileModal: React.FC<DeleteFileModalProps> = ({
|
||||
title="Delete File"
|
||||
centered
|
||||
>
|
||||
<Text>Are you sure you want to delete "{selectedFile}"?</Text>
|
||||
<Text>Are you sure you want to delete "{selectedFile}"?</Text>
|
||||
<Group justify="flex-end" mt="xl">
|
||||
<Button
|
||||
variant="default"
|
||||
@@ -36,7 +36,7 @@ const DeleteFileModal: React.FC<DeleteFileModalProps> = ({
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button color="red" onClick={handleConfirm}>
|
||||
<Button color="red" onClick={() => void handleConfirm()}>
|
||||
Delete
|
||||
</Button>
|
||||
</Group>
|
||||
|
||||
@@ -45,7 +45,7 @@ const CommitMessageModal: React.FC<CommitMessageModalProps> = ({
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button onClick={handleSubmit}>Commit</Button>
|
||||
<Button onClick={() => void handleSubmit()}>Commit</Button>
|
||||
</Group>
|
||||
</Box>
|
||||
</Modal>
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
Button,
|
||||
Group,
|
||||
} from '@mantine/core';
|
||||
import type { CreateUserRequest } from '@/types/adminApi';
|
||||
import { UserRole } from '@/types/authApi';
|
||||
import type { CreateUserRequest } from '@/types/api';
|
||||
import { UserRole } from '@/types/models';
|
||||
|
||||
interface CreateUserModalProps {
|
||||
opened: boolean;
|
||||
@@ -85,7 +85,7 @@ const CreateUserModal: React.FC<CreateUserModalProps> = ({
|
||||
<Button variant="default" onClick={onClose}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button onClick={handleSubmit} loading={loading}>
|
||||
<Button onClick={() => void handleSubmit} loading={loading}>
|
||||
Create User
|
||||
</Button>
|
||||
</Group>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Modal, Text, Button, Group, Stack } from '@mantine/core';
|
||||
import type { User } from '@/types/authApi';
|
||||
import type { User } from '@/types/models';
|
||||
|
||||
interface DeleteUserModalProps {
|
||||
opened: boolean;
|
||||
@@ -26,14 +26,15 @@ const DeleteUserModal: React.FC<DeleteUserModalProps> = ({
|
||||
>
|
||||
<Stack>
|
||||
<Text>
|
||||
Are you sure you want to delete user "{user?.email}"? This action cannot
|
||||
be undone and all associated data will be permanently deleted.
|
||||
Are you sure you want to delete user "{user?.email}"? This
|
||||
action cannot be undone and all associated data will be permanently
|
||||
deleted.
|
||||
</Text>
|
||||
<Group justify="flex-end" mt="xl">
|
||||
<Button variant="default" onClick={onClose}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button color="red" onClick={onConfirm} loading={loading}>
|
||||
<Button color="red" onClick={() => void onConfirm()} loading={loading}>
|
||||
Delete User
|
||||
</Button>
|
||||
</Group>
|
||||
|
||||
@@ -9,9 +9,8 @@ import {
|
||||
PasswordInput,
|
||||
Text,
|
||||
} from '@mantine/core';
|
||||
import type { UpdateUserRequest } from '@/types/adminApi';
|
||||
import type { User} from '@/types/authApi';
|
||||
import { UserRole } from '@/types/authApi';
|
||||
import type { UpdateUserRequest } from '@/types/api';
|
||||
import { type User, UserRole } from '@/types/models';
|
||||
|
||||
interface EditUserModalProps {
|
||||
opened: boolean;
|
||||
@@ -114,7 +113,7 @@ const EditUserModal: React.FC<EditUserModalProps> = ({
|
||||
<Button variant="default" onClick={onClose}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button onClick={handleSubmit} loading={loading}>
|
||||
<Button onClick={() => void handleSubmit} loading={loading}>
|
||||
Save Changes
|
||||
</Button>
|
||||
</Group>
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
|
||||
import { Modal, TextInput, Button, Group, Box } from '@mantine/core';
|
||||
import { useModalContext } from '../../../contexts/ModalContext';
|
||||
import { notifications } from '@mantine/notifications';
|
||||
import type { Workspace } from '@/types/workspace';
|
||||
import type { Workspace } from '@/types/models';
|
||||
import { createWorkspace } from '@/api/workspace';
|
||||
|
||||
interface CreateWorkspaceModalProps {
|
||||
@@ -38,9 +38,9 @@ const CreateWorkspaceModal: React.FC<CreateWorkspaceModalProps> = ({
|
||||
setName('');
|
||||
setCreateWorkspaceModalVisible(false);
|
||||
if (onWorkspaceCreated) {
|
||||
onWorkspaceCreated(workspace);
|
||||
await onWorkspaceCreated(workspace);
|
||||
}
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
notifications.show({
|
||||
title: 'Error',
|
||||
message: 'Failed to create workspace',
|
||||
@@ -77,7 +77,7 @@ const CreateWorkspaceModal: React.FC<CreateWorkspaceModalProps> = ({
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button onClick={handleSubmit} loading={loading}>
|
||||
<Button onClick={() => void handleSubmit} loading={loading}>
|
||||
Create
|
||||
</Button>
|
||||
</Group>
|
||||
|
||||
@@ -23,15 +23,15 @@ const DeleteWorkspaceModal: React.FC<DeleteUserModalProps> = ({
|
||||
>
|
||||
<Stack>
|
||||
<Text>
|
||||
Are you sure you want to delete workspace "{workspaceName}"? This action
|
||||
cannot be undone and all files in this workspace will be permanently
|
||||
deleted.
|
||||
Are you sure you want to delete workspace "{workspaceName}"?
|
||||
This action cannot be undone and all files in this workspace will be
|
||||
permanently deleted.
|
||||
</Text>
|
||||
<Group justify="flex-end" mt="xl">
|
||||
<Button variant="default" onClick={onClose}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button color="red" onClick={onConfirm}>
|
||||
<Button color="red" onClick={() => void onConfirm}>
|
||||
Delete Workspace
|
||||
</Button>
|
||||
</Group>
|
||||
|
||||
Reference in New Issue
Block a user