[PUI] fix a few sonarcloud warnings (#8133)

* fix a few code issues

* fix common sonarcloud issues

* more small fixes
This commit is contained in:
Matthias Mair
2024-09-17 14:16:29 +10:00
committed by GitHub
parent 45aab46db3
commit 7c937fa283
53 changed files with 211 additions and 229 deletions
@@ -1,6 +1,4 @@
// import SimpleMDE from "react-simplemde-editor";
import { t } from '@lingui/macro';
import { useMantineColorScheme } from '@mantine/core';
import { notifications } from '@mantine/notifications';
import { useQuery } from '@tanstack/react-query';
import EasyMDE, { default as SimpleMde } from 'easymde';
@@ -60,13 +58,11 @@ export default function NotesEditor({
modelType,
modelId,
editable
}: {
}: Readonly<{
modelType: ModelType;
modelId: number;
editable?: boolean;
}) {
const { colorScheme } = useMantineColorScheme();
}>) {
// In addition to the editable prop, we also need to check if the user has "enabled" editing
const [editing, setEditing] = useState<boolean>(false);