mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-03 02:54:42 -05:00
4f838ccacf
[web] BS5 share modal GitOrigin-RevId: 40a33e06eab720b568d31aefa021682535b6934e
60 lines
1.5 KiB
TypeScript
60 lines
1.5 KiB
TypeScript
import { useTranslation } from 'react-i18next'
|
|
import { sendMB } from '@/infrastructure/event-tracking'
|
|
import OLButton from '@/features/ui/components/ol/ol-button'
|
|
import {
|
|
OLModalBody,
|
|
OLModalFooter,
|
|
OLModalHeader,
|
|
OLModalTitle,
|
|
} from '@/features/ui/components/ol/ol-modal'
|
|
|
|
type ViewOnlyAccessModalContentProps = {
|
|
handleHide: () => void
|
|
}
|
|
|
|
export default function ViewOnlyAccessModalContent({
|
|
handleHide,
|
|
}: ViewOnlyAccessModalContentProps) {
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
<>
|
|
<OLModalHeader closeButton>
|
|
<OLModalTitle>{t('view_only_access')}</OLModalTitle>
|
|
</OLModalHeader>
|
|
|
|
<OLModalBody>
|
|
<p>{t('this_project_already_has_maximum_editors')}</p>
|
|
<p>{t('please_ask_the_project_owner_to_upgrade_more_editors')}</p>
|
|
</OLModalBody>
|
|
<OLModalFooter>
|
|
<OLButton
|
|
variant="secondary"
|
|
href="/blog/changes-to-project-sharing"
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
onClick={() => {
|
|
sendMB('notification-click', {
|
|
name: 'link-sharing-collaborator-limit',
|
|
button: 'learn',
|
|
})
|
|
}}
|
|
>
|
|
{t('learn_more')}
|
|
</OLButton>
|
|
<OLButton
|
|
variant="primary"
|
|
onClick={() => {
|
|
sendMB('notification-click', {
|
|
name: 'link-sharing-collaborator-limit',
|
|
button: 'ok',
|
|
})
|
|
handleHide()
|
|
}}
|
|
>
|
|
{t('ok')}
|
|
</OLButton>
|
|
</OLModalFooter>
|
|
</>
|
|
)
|
|
}
|