Skip to content

Commit 0461ac4

Browse files
committed
feat(editor): enhance CreateContent component with improved data handling and state management
1 parent b7bc6f5 commit 0461ac4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/editor/editor/extensions/slash-command.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
22
import React, {
33
useState,
44
useEffect,
@@ -231,11 +231,11 @@ const CommandList = ({
231231
range: any;
232232
}) => {
233233
// Use items.length as key to reset selectedIndex when items change
234-
234+
// eslint-disable-next-line react-hooks/exhaustive-deps
235235
const [selectedIndex, setSelectedIndex] = useState(0);
236236

237237
// Reset selection when items change - using useLayoutEffect to run synchronously
238-
238+
// eslint-disable-next-line react-hooks/set-state-in-effect
239239
useLayoutEffect(() => {
240240
setSelectedIndex(0);
241241
}, [items]);

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./.next/dev/types/routes.d.ts";
3+
import "./.next/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

0 commit comments

Comments
 (0)