mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -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
31 lines
697 B
TypeScript
31 lines
697 B
TypeScript
import { useSubscriptionDashboardContext } from '../../context/subscription-dashboard-context'
|
|
import ManagedInstitution from './managed-institution'
|
|
|
|
export type Institution = {
|
|
v1Id: number
|
|
managerIds: string[]
|
|
metricsEmail: {
|
|
optedOutUserIds: string[]
|
|
lastSent: Date
|
|
}
|
|
name: string
|
|
}
|
|
|
|
export default function ManagedInstitutions() {
|
|
const { managedInstitutions } = useSubscriptionDashboardContext()
|
|
|
|
if (!managedInstitutions) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<>
|
|
{managedInstitutions.map(institution => (
|
|
<ManagedInstitution
|
|
institution={institution}
|
|
key={`managed-institution-${institution.v1Id}`}
|
|
/>
|
|
))}
|
|
</>
|
|
)
|
|
}
|