Skip to content

Commit d833534

Browse files
davidagustinclaude
andcommitted
fix(ui-patterns): restore userCode dependency in test-reset useEffect
The biome auto-formatter removed userCode from the useEffect dependency array, which broke the "reset test results when code changes" behavior. Add biome-ignore comment to preserve the intentional trigger dependency. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5046d27 commit d833534

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • app/frontend-drills/[framework]/ui-patterns/[patternId]

app/frontend-drills/[framework]/ui-patterns/[patternId]/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,9 +853,10 @@ export default function UIPatternDetail() {
853853
}, []);
854854

855855
// Reset test results when user code changes
856+
// biome-ignore lint/correctness/useExhaustiveDependencies: intentionally re-run on userCode change
856857
useEffect(() => {
857858
setTestResults(null); // eslint-disable-line react-hooks/set-state-in-effect -- Reset tests on code change
858-
}, []);
859+
}, [userCode]);
859860

860861
const handleRunTests = useCallback(() => {
861862
if (previewIframeRef.current?.contentWindow) {

0 commit comments

Comments
 (0)