mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 01:50:39 +09:00
Address Greptile review fixes
This commit is contained in:
parent
269dd6abbe
commit
5de5fb507a
3 changed files with 39 additions and 22 deletions
|
|
@ -1190,14 +1190,16 @@ function AgentSkillsTab({
|
|||
useEffect(() => {
|
||||
if (!skillSnapshot) return;
|
||||
if (syncSkills.isPending) return;
|
||||
if (arraysEqual(skillDraft, lastSavedSkills)) return;
|
||||
if (arraysEqual(skillDraft, lastSavedSkillsRef.current)) return;
|
||||
|
||||
const timeout = window.setTimeout(() => {
|
||||
syncSkills.mutate(skillDraft);
|
||||
if (!arraysEqual(skillDraft, lastSavedSkillsRef.current)) {
|
||||
syncSkills.mutate(skillDraft);
|
||||
}
|
||||
}, 250);
|
||||
|
||||
return () => window.clearTimeout(timeout);
|
||||
}, [lastSavedSkills, skillDraft, skillSnapshot, syncSkills.isPending, syncSkills.mutate]);
|
||||
}, [skillDraft, skillSnapshot, syncSkills.isPending, syncSkills.mutate]);
|
||||
|
||||
const companySkillBySlug = useMemo(
|
||||
() => new Map((companySkills ?? []).map((skill) => [skill.slug, skill])),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue