mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
ed40a87cdc
* Rename manage group entry point * Migrate group management root page to React * Add cypress tests for the group management react page * Fix linting * Add checkbox labels for screen-readers + remove unused classes * Await on add/remove members calls * Display the export CSV link for a full group * Display error message when group is full * Sort locales * Handle the managers management page in React version * Fix missing type in GroupMemberRow * Split members and managers React pages * Build API paths on frontend side + add cypress tests for each page * Fix linting * Update unit tests * Review improvements * Type API errors GitOrigin-RevId: d124a9d24cbf33de8aacc5d69e9d46e7bcda93c5
37 lines
935 B
TypeScript
37 lines
935 B
TypeScript
import { useTranslation } from 'react-i18next'
|
|
import { useMemo } from 'react'
|
|
import useWaitForI18n from '../../../shared/hooks/use-wait-for-i18n'
|
|
import getMeta from '../../../utils/meta'
|
|
import { ManagersTable } from './managers-table'
|
|
|
|
export default function InstitutionManagers() {
|
|
const { isReady } = useWaitForI18n()
|
|
const { t } = useTranslation()
|
|
|
|
const groupId: string = getMeta('ol-groupId')
|
|
const groupName: string = getMeta('ol-groupName')
|
|
|
|
const paths = useMemo(
|
|
() => ({
|
|
addMember: `/manage/institutions/${groupId}/managers`,
|
|
removeMember: `/manage/institutions/${groupId}/managers`,
|
|
}),
|
|
[groupId]
|
|
)
|
|
|
|
if (!isReady) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<ManagersTable
|
|
groupName={groupName}
|
|
translations={{
|
|
title: t('institution_account'),
|
|
subtitle: t('managers_management'),
|
|
remove: t('remove_manager'),
|
|
}}
|
|
paths={paths}
|
|
/>
|
|
)
|
|
}
|