22
33import type { ClientCollectionConfig } from 'payload'
44
5+ import { getTranslation } from '@payloadcms/translations'
56import {
67 Button ,
78 Modal ,
@@ -21,8 +22,8 @@ import type {
2122 PluginMultiTenantTranslations ,
2223} from '../../translations/index.js'
2324
24- import './index.scss'
2525import { useTenantSelection } from '../../providers/TenantSelectionProvider/index.client.js'
26+ import './index.scss'
2627
2728export const assignTenantModalSlug = 'assign-tenant-field-modal'
2829const baseClass = 'assign-tenant-field-modal'
@@ -53,7 +54,10 @@ export const AssignTenantFieldModal: React.FC<{
5354 onConfirm ?: ( ) => void
5455} > = ( { afterModalClose, afterModalOpen, children, onCancel, onConfirm } ) => {
5556 const editDepth = useDrawerDepth ( )
56- const { t } = useTranslation < PluginMultiTenantTranslations , PluginMultiTenantTranslationKeys > ( )
57+ const { i18n, t } = useTranslation <
58+ PluginMultiTenantTranslations ,
59+ PluginMultiTenantTranslationKeys
60+ > ( )
5761 const { collectionSlug } = useDocumentInfo ( )
5862 const { title } = useDocumentTitle ( )
5963 const { getEntityConfig } = useConfig ( )
@@ -114,7 +118,7 @@ export const AssignTenantFieldModal: React.FC<{
114118 } ) }
115119 </ h3 >
116120 < Pill className = { `${ baseClass } __collection-pill` } size = "small" >
117- < > { collectionConfig . labels . singular } </ >
121+ { getTranslation ( collectionConfig . labels . singular , i18n ) }
118122 </ Pill >
119123 </ div >
120124 < div className = { `${ baseClass } __content` } > { children } </ div >
0 commit comments