-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): Update privacy policy and terms of use (#280)
* wip: setup * fx=ix: duplicate text and tests * fix: unit test * fix: terms data
- Loading branch information
1 parent
c57a077
commit 15f5e43
Showing
17 changed files
with
779 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { IonCol, IonGrid, IonModal, IonRow } from "@ionic/react"; | ||
import { PrivacyPolicyModalProps } from "./PrivacyPolicyModal.types"; | ||
import { PageLayout } from "../layout/PageLayout"; | ||
import { privacyPolicyData } from "./PrivacyPolicyData"; | ||
|
||
const PrivacyPolicyModal = ({ isOpen, setIsOpen }: PrivacyPolicyModalProps) => { | ||
const Section = ({ title, content }: { title: string; content: any }) => ( | ||
<div> | ||
<h3>{title}</h3> | ||
{content.map((item: any, index: number) => ( | ||
<p key={index}> | ||
{item.subtitle && <b>{item.subtitle}</b>} | ||
{item.text && <span>{item.text}</span>} | ||
</p> | ||
))} | ||
</div> | ||
); | ||
return ( | ||
<IonModal | ||
isOpen={isOpen} | ||
initialBreakpoint={1} | ||
breakpoints={[0, 0.25, 0.5, 0.75, 1]} | ||
className="page-layout" | ||
data-testid="privacy-policy-modal" | ||
onDidDismiss={() => setIsOpen(false)} | ||
> | ||
<div className="terms-and-conditions modal"> | ||
<PageLayout | ||
header={true} | ||
closeButton={true} | ||
closeButtonAction={() => setIsOpen(false)} | ||
title={privacyPolicyData.intro.title} | ||
> | ||
<IonGrid> | ||
<IonRow> | ||
<IonCol | ||
size="12" | ||
className="terms-and-conditions-body" | ||
> | ||
<p> | ||
<b>{privacyPolicyData.intro.text}</b> | ||
</p> | ||
{privacyPolicyData.sections.map((section, index) => ( | ||
<Section | ||
key={index} | ||
title={section.title} | ||
content={section.content} | ||
/> | ||
))} | ||
</IonCol> | ||
</IonRow> | ||
</IonGrid> | ||
</PageLayout> | ||
</div> | ||
</IonModal> | ||
); | ||
}; | ||
|
||
export { PrivacyPolicyModal }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
interface PrivacyPolicyModalProps { | ||
isOpen: boolean; | ||
setIsOpen: (value: boolean) => void; | ||
} | ||
|
||
export type { PrivacyPolicyModalProps }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./PrivacyPolicyModal"; |
44 changes: 0 additions & 44 deletions
44
src/ui/components/TermsAndConditions/TermsAndConditions.tsx
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/ui/components/TermsAndConditions/TermsAndConditions.types.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.