mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 13:49:00 +02:00
549840f3a3
* Add event `unified-access-footer-click` * Remove redundant `page` segmentation Co-authored-by: @copilot GitOrigin-RevId: 81ba64d09e29466fb73f200859805b6e17990dca
83 lines
2.8 KiB
TypeScript
83 lines
2.8 KiB
TypeScript
import React, { FC, ReactNode } from 'react'
|
|
import { Trans } from 'react-i18next'
|
|
import * as eventTracking from '@/infrastructure/event-tracking'
|
|
import dsLogo from '@/shared/svgs/digital-science.svg'
|
|
|
|
type Props = { children: ReactNode }
|
|
|
|
const CiamLayout: FC<Props> = ({ children }: Props) => (
|
|
<div className="ciam-layout ciam-enabled">
|
|
<header className="ciam-logo">
|
|
<a href="/" className="brand overleaf-ds-logo ciam-image-link">
|
|
<span className="visually-hidden">Overleaf</span>
|
|
</a>
|
|
</header>
|
|
<div className="ciam-container">
|
|
<main className="ciam-card" id="main-content">
|
|
{children}
|
|
<section className="ciam-card-footer">
|
|
<hr className="ciam-card-separator" />
|
|
<div className="ciam-footer-ds-logo">
|
|
<a
|
|
href="https://www.digital-science.com/"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="ciam-image-link"
|
|
onClick={() =>
|
|
eventTracking.sendMB('unified-access-footer-click', {
|
|
product: 'overleaf',
|
|
item: 'logo',
|
|
destinationUrl: 'https://www.digital-science.com/',
|
|
})
|
|
}
|
|
>
|
|
<img src={dsLogo} alt="Digital Science — home" />
|
|
</a>
|
|
</div>
|
|
<p>
|
|
<Trans
|
|
i18nKey="advancing_research_with"
|
|
components={[
|
|
// eslint-disable-next-line jsx-a11y/anchor-has-content,react/jsx-key
|
|
<a
|
|
href="https://www.overleaf.com/"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
onClick={() =>
|
|
eventTracking.sendMB('unified-access-footer-click', {
|
|
product: 'overleaf',
|
|
item: 'overleaf',
|
|
destinationUrl: 'https://www.overleaf.com/',
|
|
})
|
|
}
|
|
/>,
|
|
// eslint-disable-next-line jsx-a11y/anchor-has-content,react/jsx-key
|
|
<a
|
|
href="https://www.papersapp.com/"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
onClick={() =>
|
|
eventTracking.sendMB('unified-access-footer-click', {
|
|
product: 'overleaf',
|
|
item: 'papers',
|
|
destinationUrl: 'https://www.papersapp.com/',
|
|
})
|
|
}
|
|
/>,
|
|
]}
|
|
/>
|
|
</p>
|
|
</section>
|
|
</main>
|
|
</div>
|
|
<footer>
|
|
<div className="footer-links">
|
|
<a href="https://www.overleaf.com/legal#Privacy">Privacy</a>
|
|
<a href="https://www.overleaf.com/legal#Terms">Terms</a>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
)
|
|
|
|
export default CiamLayout
|