mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 08:23:34 +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: {
|
||||
...reactHooks.configs.recommended.rules,
|
||||
"react-hooks/exhaustive-deps": "error",
|
||||
"react-refresh/only-export-components": [
|
||||
"warn",
|
||||
{ allowConstantExport: true },
|
||||
|
||||
@@ -295,18 +295,6 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
|
||||
}
|
||||
}, [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) => {
|
||||
setAttachedFiles(prev => [...prev, file]);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user