Skip to content

Commit

Permalink
fix(ui): close copy locale modal after locale is changed (#10096)
Browse files Browse the repository at this point in the history
Ensures we close the modal _only_ after locale is changed. This caused
our localization e2e's to flake:

![image](https://github.com/user-attachments/assets/41205afe-0e45-499b-9aa6-07734a7f26fc)
  • Loading branch information
r1tsuu authored Dec 20, 2024
1 parent 7c4ea5b commit 59fc9d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ui/src/elements/CopyLocaleData/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ export const CopyLocaleData: React.FC = () => {
})

setCopying(false)
toggleModal(drawerSlug)
router.push(
`${serverURL}${admin}/${collectionSlug ? `collections/${collectionSlug}/${id}` : `globals/${globalSlug}`}?locale=${to}`,
)
toggleModal(drawerSlug)
} catch (error) {
toast.error(error.message)
}
Expand Down

0 comments on commit 59fc9d0

Please sign in to comment.