mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Fix various eslint issues
This commit is contained in:
@@ -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