(
+ ({ ownerName }) => {
+ const { t } = useTranslation()
+
+ const x = ownerName === 'You' ? t('you') : ownerName
+
+ return <> — {t('owned_by_x', { x })}>
+ }
+)
+ProjectListOwnerName.displayName = 'ProjectListOwnerName'
diff --git a/services/web/frontend/js/features/project-list/components/table/project-list-table-row.tsx b/services/web/frontend/js/features/project-list/components/table/project-list-table-row.tsx
index 235c839ccd..8fcb047efb 100644
--- a/services/web/frontend/js/features/project-list/components/table/project-list-table-row.tsx
+++ b/services/web/frontend/js/features/project-list/components/table/project-list-table-row.tsx
@@ -8,12 +8,14 @@ import ActionsDropdown from '../dropdown/actions-dropdown'
import { getOwnerName } from '../../util/project'
import { Project } from '../../../../../../types/project/dashboard/api'
import { ProjectCheckbox } from './project-checkbox'
+import { ProjectListOwnerName } from '@/features/project-list/components/table/project-list-owner-name'
type ProjectListTableRowProps = {
project: Project
}
function ProjectListTableRow({ project }: ProjectListTableRowProps) {
const { t } = useTranslation()
+
const ownerName = getOwnerName(project)
return (
@@ -30,7 +32,7 @@ function ProjectListTableRow({ project }: ProjectListTableRowProps) {
- {ownerName ? <> — {t('owned_by_x', { x: ownerName })}> : null}
+ {ownerName ? : null}
|
|