Merge pull request #28126 from overleaf/ii-domain-capture-join-success-message
[web] Notification message for joining group via domain capture GitOrigin-RevId: 67ef924b2d80afb5e1de75fb6aab147263c0f33c
This commit is contained in:
+26
-4
@@ -1,24 +1,46 @@
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useTranslation, Trans } from 'react-i18next'
|
||||
import Notification from '../../../../../shared/components/notification'
|
||||
import getMeta from '../../../../../utils/meta'
|
||||
|
||||
function GroupSsoSetupSuccess() {
|
||||
const { t } = useTranslation()
|
||||
const wasSuccess = getMeta('ol-groupSsoSetupSuccess')
|
||||
const joinedGroupName = getMeta('ol-joinedGroupName')
|
||||
const viaDomainCapture = getMeta('ol-viaDomainCapture')
|
||||
|
||||
if (!wasSuccess) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
if (!viaDomainCapture) {
|
||||
return (
|
||||
<li className="notification-entry">
|
||||
<Notification
|
||||
type="success"
|
||||
content={t('success_sso_set_up')}
|
||||
isDismissible
|
||||
/>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
||||
return joinedGroupName ? (
|
||||
<li className="notification-entry">
|
||||
<Notification
|
||||
type="success"
|
||||
content={t('success_sso_set_up')}
|
||||
content={
|
||||
<Trans
|
||||
i18nKey="success_youve_successfully_join_group"
|
||||
components={[<b />]} // eslint-disable-line react/jsx-key
|
||||
values={{ groupName: joinedGroupName }}
|
||||
shouldUnescape
|
||||
tOptions={{ interpolation: { escapeValue: true } }}
|
||||
/>
|
||||
}
|
||||
isDismissible
|
||||
/>
|
||||
</li>
|
||||
)
|
||||
) : null
|
||||
}
|
||||
|
||||
export default GroupSsoSetupSuccess
|
||||
|
||||
Reference in New Issue
Block a user