-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(opentrons-ai-client): Created the footer component with the privacy policy and EULA #16535
Conversation
} | ||
`; | ||
|
||
const DISCLAIMER_TEXT_STYLE = css` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can use the styled component approach to keep consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
const [ | ||
firstPart, | ||
privacyPolicy, | ||
and, | ||
EULA, | ||
copyright, | ||
] = privacyPolicyText.split('\n') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use the Trans component in i18next so you dont have to split apart the text and feed it into different components:
https://react.i18next.com/latest/trans-component
so it would be something like this in the translation file:
{
"privacy_policy": "{{firstPart}} <privacyPolicyLink>Privacy Policy</privacyPolicyLink> {{and}} <EULALink>EULA</EULALink> {{copyright}}"
}
and like this in your react component:
import { Trans, useTranslation } from 'react-i18next';
const { t } = useTranslation('protocol_generator');
<FooterText>
<Trans
i18nKey="privacy_policy"
components={{
privacyPolicyLink: (
<BlueLink
href="https://insights.opentrons.com/hubfs/Legal%20Documentation/Opentrons-Labworks-Privacy-Policy-5-4-23.docx-1.pdf"
target="_blank"
rel="noopener noreferrer"
/>
),
EULALink: (
<BlueLink
href="https://insights.opentrons.com/hubfs/Legal%20Documentation/Opentrons%20EULA%2020240710.pdf"
target="_blank"
rel="noopener noreferrer"
/>
)
}}
/>
<NewLineText>{t('copyright')}</NewLineText>
</FooterText>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Overview
Test Plan and Hands on Testing
Manually tested both links
Changelog
The footer links to the following two urls:
Privacy policy:
"https://insights.opentrons.com/hubfs/Legal%20Documentation/Opentrons-Labworks-Privacy-Policy-5-4-23.docx-1.pdf"
EULA:
"https://insights.opentrons.com/hubfs/Legal%20Documentation/Opentrons%20EULA%2020240710.pdf"
Review requests
Risk assessment