mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 21:01:33 +02:00
Merge pull request #10028 from overleaf/ab-fix-flaky-fe-tests
[web] Fix flaky project list frontend tests GitOrigin-RevId: 2b2a90e6a294ec7dd5e7203dadd708f7986a56fc
This commit is contained in:
committed by
Copybot
parent
22336942a8
commit
0c170bd4c0
@@ -28,17 +28,28 @@ function CopyProjectMenuItem() {
|
||||
}
|
||||
}, [isMounted])
|
||||
|
||||
const handleAfterCloned = (clonedProject: Project) => {
|
||||
const project = selectedProjects[0]
|
||||
eventTracking.send(
|
||||
'project-list-page-interaction',
|
||||
'project action',
|
||||
'Clone'
|
||||
)
|
||||
addClonedProjectToViewData(clonedProject)
|
||||
updateProjectViewData({ ...project, selected: false })
|
||||
setShowModal(false)
|
||||
}
|
||||
const handleAfterCloned = useCallback(
|
||||
(clonedProject: Project) => {
|
||||
const project = selectedProjects[0]
|
||||
eventTracking.send(
|
||||
'project-list-page-interaction',
|
||||
'project action',
|
||||
'Clone'
|
||||
)
|
||||
addClonedProjectToViewData(clonedProject)
|
||||
updateProjectViewData({ ...project, selected: false })
|
||||
|
||||
if (isMounted.current) {
|
||||
setShowModal(false)
|
||||
}
|
||||
},
|
||||
[
|
||||
isMounted,
|
||||
selectedProjects,
|
||||
addClonedProjectToViewData,
|
||||
updateProjectViewData,
|
||||
]
|
||||
)
|
||||
|
||||
if (selectedProjects.length !== 1) return null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user