File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/ui/src/elements/CopyLocaleData Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 3
3
import { useModal } from '@faceless-ui/modal'
4
4
import { getTranslation } from '@payloadcms/translations'
5
5
import { useRouter } from 'next/navigation.js'
6
+ import { formatAdminURL } from 'payload/shared'
6
7
import React , { useCallback } from 'react'
7
8
import { toast } from 'sonner'
8
9
@@ -82,7 +83,11 @@ export const CopyLocaleData: React.FC = () => {
82
83
83
84
startRouteTransition ( ( ) =>
84
85
router . push (
85
- `${ serverURL } ${ admin } /${ collectionSlug ? `collections/${ collectionSlug } /${ id } ` : `globals/${ globalSlug } ` } ?locale=${ to } ` ,
86
+ formatAdminURL ( {
87
+ adminRoute : admin ,
88
+ path : `/${ collectionSlug ? `collections/${ collectionSlug } /${ id } ` : `globals/${ globalSlug } ` } ` ,
89
+ serverURL,
90
+ } ) + `?locale=${ to } ` ,
86
91
) ,
87
92
)
88
93
You can’t perform that action at this time.
0 commit comments