Skip to content

Commit

Permalink
Move all terms and privacy links to tos-privacy configurables module (#…
Browse files Browse the repository at this point in the history
…1961)

Summary: Move all terms and privacy links to tos-privacy configurables
module

Relevant Issues: N/A

Type of change: /kind cleanup

Test Plan: Verified that the links on `/auth/signup` are correct with ui
local dev workflow

---------

Signed-off-by: Dom Del Nano <[email protected]>
  • Loading branch information
ddelnano authored Jul 15, 2024
1 parent 730d051 commit f0dadea
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/ui/src/components/auth/auth-box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { createStyles, makeStyles } from '@mui/styles';

import pixieAnalytics from 'app/utils/analytics';
import { WithChildren } from 'app/utils/react-boilerplate';
import { privacyUri, termsUri } from 'configurable/tos-privacy';

import { PixienautBox } from './pixienaut-box';

Expand Down Expand Up @@ -113,9 +114,9 @@ export const AuthBox: React.FC<WithChildren<AuthBoxProps>> = React.memo((props)
<>
<Typography variant='subtitle2' className={classes.disclaimer}>
By signing up, you&apos;re agreeing to&nbsp;
<a href='https://pixielabs.ai/terms/'>Terms of Service</a>
<a href={termsUri}>Terms of Service</a>
&nbsp;and&nbsp;
<a href='https://pixielabs.ai/privacy'>Privacy Policy</a>
<a href={privacyUri}>Privacy Policy</a>
.
</Typography>
</>
Expand Down
1 change: 1 addition & 0 deletions src/ui/src/configurables/base/signup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

// Need to encapsulate so that newline is properly escaped.
export const signupMessage = `Pixie Community is Free Forever.
No Credit Card Needed.`;
6 changes: 4 additions & 2 deletions src/ui/src/configurables/base/tos-privacy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
*/

import * as React from 'react';
export const termsUri = 'https://www.linuxfoundation.org/terms';
export const privacyUri = 'https://www.linuxfoundation.org/privacy';

export const TermsAndPrivacy = React.memo<{ classes: Record<'text', string> }>(({ classes }) => {
return (<>
<a href='https://www.linuxfoundation.org/terms' className={classes.text}>
<a href={termsUri} className={classes.text}>
Terms & Conditions
</a>
<a href='https://www.linuxfoundation.org/privacy' className={classes.text}>
<a href={privacyUri} className={classes.text}>
Privacy Policy
</a>
</>);
Expand Down
1 change: 0 additions & 1 deletion src/ui/src/pages/auth/signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export const SignupPage = React.memo(() => {
<AuthBox
toggleURL={`/auth/login${window.location.search}`}
title='Get Started'
// Need to encapsulate so that newline is properly escaped.
body={signupMessage}
buttonCaption='Already have an account?'
buttonText='Login'
Expand Down

0 comments on commit f0dadea

Please sign in to comment.