overleaf/services/web/frontend/js/features/subscription/components/dashboard/managed-publisher.tsx
Alexandre Bourdin d6e9508aed [web] Migrate managed publishers to React dash (#11749)
* Migrate managed publishers to React dash

* Decaf cleanup + async/await PublishersGetter

* Continue migration of managed publishers to react dash

* Fix linting

* Add tests

* Decaf cleanup PublishersGetterTests

* Update PublishersGetter tests

* Rename component files to kebab-case

GitOrigin-RevId: cb1fe14d120457c965a9d23a8ddb2c2c92e1d5da
2023-02-23 09:04:03 +00:00

35 lines
919 B
TypeScript

import { Trans, useTranslation } from 'react-i18next'
import { Publisher } from './managed-publishers'
type ManagedPublisherProps = {
publisher: Publisher
}
export default function ManagedPublisher({ publisher }: ManagedPublisherProps) {
const { t } = useTranslation()
return (
<div>
<p>
<Trans
i18nKey="you_are_a_manager_of_publisher_x"
components={[<strong />]} // eslint-disable-line react/jsx-key
values={{
publisherName: publisher.name || '',
}}
/>
</p>
<p>
<a href={`/publishers/${publisher.slug}/hub`}>
<i className="fa fa-fw fa-user-circle" /> {t('view_hub')}
</a>
</p>
<p>
<a href={`/manage/publishers/${publisher.slug}/managers`}>
<i className="fa fa-fw fa-users" /> {t('manage_publisher_managers')}
</a>
</p>
<hr />
</div>
)
}