mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -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
28 lines
618 B
TypeScript
28 lines
618 B
TypeScript
import { useSubscriptionDashboardContext } from '../../context/subscription-dashboard-context'
|
|
import ManagedPublisher from './managed-publisher'
|
|
|
|
export type Publisher = {
|
|
slug: string
|
|
managerIds: string[]
|
|
name: string
|
|
partner: string
|
|
}
|
|
|
|
export default function ManagedPublishers() {
|
|
const { managedPublishers } = useSubscriptionDashboardContext()
|
|
|
|
if (!managedPublishers) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<>
|
|
{managedPublishers.map(publisher => (
|
|
<ManagedPublisher
|
|
publisher={publisher}
|
|
key={`managed-publisher-${publisher.slug}`}
|
|
/>
|
|
))}
|
|
</>
|
|
)
|
|
}
|