mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 01:16:51 -05:00
d6e9508aed
* 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
35 lines
919 B
TypeScript
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>
|
|
)
|
|
}
|