mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Make react-hooks/exhaustive-deps required
This commit is contained in:
2 files changed
+1
-12
No files matched your search
@@ -27,6 +27,7 @@ export default tseslint.config(
|
|||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
...reactHooks.configs.recommended.rules,
|
...reactHooks.configs.recommended.rules,
|
||||||
|
"react-hooks/exhaustive-deps": "error",
|
||||||
"react-refresh/only-export-components": [
|
"react-refresh/only-export-components": [
|
||||||
"warn",
|
"warn",
|
||||||
{ allowConstantExport: true },
|
{ allowConstantExport: true },
|
||||||
|
|||||||
@@ -295,18 +295,6 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
|
|||||||
}
|
}
|
||||||
}, [projectId, scrolledProjects]);
|
}, [projectId, scrolledProjects]);
|
||||||
|
|
||||||
// Also scroll on initial mount if we have a projectId
|
|
||||||
useEffect(() => {
|
|
||||||
if (projectId && !scrolledProjects.has(projectId)) {
|
|
||||||
const timer = setTimeout(() => {
|
|
||||||
scrollToBottom();
|
|
||||||
scrolledProjects.add(projectId);
|
|
||||||
}, 100);
|
|
||||||
|
|
||||||
return () => clearTimeout(timer);
|
|
||||||
}
|
|
||||||
}, []); // Empty dependency array = runs on mount
|
|
||||||
|
|
||||||
const handleFileSelect = (file: File) => {
|
const handleFileSelect = (file: File) => {
|
||||||
setAttachedFiles(prev => [...prev, file]);
|
setAttachedFiles(prev => [...prev, file]);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user