mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
cf2dfc6bf1
[SettingsPage] Integration Branch GitOrigin-RevId: 5a3c26b2a02d716c4ae3981e3f08b811ae307725
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import { useTranslation } from 'react-i18next'
|
|
import importOverleafModules from '../../../../macros/import-overleaf-module.macro'
|
|
const integrationLinkingWidgets = importOverleafModules(
|
|
'integrationLinkingWidgets'
|
|
)
|
|
|
|
function IntegrationLinkingSection() {
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
<>
|
|
<h3>{t('integrations')}</h3>
|
|
<p>{t('linked_accounts_explained')}</p>
|
|
<div className="settings-widgets-container">
|
|
{integrationLinkingWidgets.map(
|
|
({ import: importObject, path }, widgetIndex) => (
|
|
<IntegrationLinkingWidget
|
|
key={Object.keys(importObject)[0]}
|
|
ModuleComponent={Object.values(importObject)[0]}
|
|
isLast={widgetIndex === integrationLinkingWidgets.length - 1}
|
|
/>
|
|
)
|
|
)}
|
|
</div>
|
|
</>
|
|
)
|
|
}
|
|
|
|
type IntegrationLinkingWidgetProps = {
|
|
ModuleComponent: any
|
|
isLast: boolean
|
|
}
|
|
|
|
function IntegrationLinkingWidget({
|
|
ModuleComponent,
|
|
isLast,
|
|
}: IntegrationLinkingWidgetProps) {
|
|
return (
|
|
<>
|
|
<ModuleComponent />
|
|
{isLast ? null : <hr />}
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default IntegrationLinkingSection
|