Skip to content

Commit 59fc9d0

Browse files
authored
fix(ui): close copy locale modal after locale is changed (#10096)
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)
1 parent 7c4ea5b commit 59fc9d0

File tree

1 file changed

+1
-1
lines changed
  • packages/ui/src/elements/CopyLocaleData

1 file changed

+1
-1
lines changed

packages/ui/src/elements/CopyLocaleData/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ export const CopyLocaleData: React.FC = () => {
7777
})
7878

7979
setCopying(false)
80-
toggleModal(drawerSlug)
8180
router.push(
8281
`${serverURL}${admin}/${collectionSlug ? `collections/${collectionSlug}/${id}` : `globals/${globalSlug}`}?locale=${to}`,
8382
)
83+
toggleModal(drawerSlug)
8484
} catch (error) {
8585
toast.error(error.message)
8686
}

0 commit comments

Comments
 (0)