Skip to content

Commit b810203

Browse files
committed
Fix lint
1 parent c9b3fb4 commit b810203

3 files changed

Lines changed: 2 additions & 14 deletions

File tree

packages/website/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.netlify
33
_pagefind/
44
public/sitemap.xml
5+
next-env.d.ts

packages/website/next-env.d.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/website/src/components/playground/Panel.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useCallback } from 'react';
21
import { useTheme } from 'next-themes';
32
import CodeMirror from '@uiw/react-codemirror';
43
import { javascript } from '@codemirror/lang-javascript';
@@ -41,20 +40,14 @@ export default function Panel({
4140
value,
4241
}: PanelProps) {
4342
const { resolvedTheme } = useTheme();
44-
let changeHandler;
45-
46-
if (onChange) {
47-
// eslint-disable-next-line react-hooks/rules-of-hooks
48-
changeHandler = useCallback(onChange, []);
49-
}
5043

5144
return (
5245
<CodeMirror
5346
value={value}
5447
height="100%"
5548
minHeight="100%"
5649
extensions={[languageExtension(language), disableSpellcheck()]}
57-
onChange={changeHandler}
50+
onChange={onChange}
5851
theme={(resolvedTheme as Theme) || 'light'}
5952
readOnly={readOnly}
6053
basicSetup={{

0 commit comments

Comments
 (0)