mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
c524fee690
[web] Migrate managed institutions to React dash GitOrigin-RevId: 535dfafe42d88189bb20e7bb3beac233221ee6ba
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}`}
|
|
/>
|
|
))}
|
|
</>
|
|
)
|
|
}
|