-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: getting data method for contacts & privacy-policy fragments
- Loading branch information
Showing
6 changed files
with
126 additions
and
122 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
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
129 changes: 65 additions & 64 deletions
129
landing/fragments/landing-privacy-policy/src/privacy-policy.component.tsx
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 |
---|---|---|
@@ -1,69 +1,70 @@ | ||
import React from 'react' | ||
import uniqid from 'uniqid' | ||
import { FC } from 'react' | ||
import React from 'react' | ||
import uniqid from 'uniqid' | ||
|
||
import { Box } from '@ui/layout' | ||
import { Column } from '@ui/layout' | ||
import { Layout } from '@ui/layout' | ||
import { Row } from '@ui/layout' | ||
import { Text } from '@ui/text' | ||
import { Box } from '@ui/layout' | ||
import { Column } from '@ui/layout' | ||
import { Layout } from '@ui/layout' | ||
import { Row } from '@ui/layout' | ||
import { Text } from '@ui/text' | ||
import { usePrivacyPolicy } from '@globals/data/src' | ||
|
||
import { PrivacyPolicyProps } from './privacy-policy.interfaces' | ||
|
||
const PrivacyPolicyBlock: FC<PrivacyPolicyProps> = ({ privacyPolicy }) => ( | ||
<Row justifyContent='center'> | ||
<Box width={['100%', '100%', 1920]}> | ||
<Layout flexBasis={[20, 30, 40]} flexShrink={0} /> | ||
<Column width='100%'> | ||
<Layout flexBasis={[80, 100, 142]} flexShrink={0} /> | ||
<Box width={['100%', '100%', 1050]}> | ||
<Text | ||
textTransform='uppercase' | ||
fontFamily='secondary' | ||
fontWeight='bold' | ||
fontSize={['medium', 'semiRegular', 'mild', 'big']} | ||
lineHeight='default' | ||
color='text.smokyWhite' | ||
> | ||
{privacyPolicy?.title} | ||
</Text> | ||
</Box> | ||
<Layout flexBasis={[20, 30, 50]} flexShrink={0} /> | ||
<Column> | ||
{privacyPolicy?.content?.map((item) => ( | ||
<React.Fragment key={uniqid()}> | ||
<Row> | ||
<Text | ||
fontWeight='medium' | ||
fontSize={['semiMedium', 'regular', 'large']} | ||
lineHeight='primary' | ||
color='text.smokyWhite' | ||
> | ||
{item?.title} | ||
</Text> | ||
</Row> | ||
<Layout flexBasis={[4, 6, 8]} flexShrink={0} /> | ||
<Row> | ||
<Text | ||
opacity='50%' | ||
fontWeight='medium' | ||
fontSize={['micro', 'middling', 'medium']} | ||
lineHeight='primary' | ||
color='text.smokyWhite' | ||
> | ||
{item?.description} | ||
</Text> | ||
<Layout width={[16, 100, 200]} flexShrink={0} /> | ||
</Row> | ||
<Layout flexBasis={[16, 24, 40]} /> | ||
</React.Fragment> | ||
))} | ||
const PrivacyPolicyBlock = () => { | ||
const { privacyPolicyData } = usePrivacyPolicy() | ||
return ( | ||
<Row justifyContent='center'> | ||
<Box width={['100%', '100%', 1920]}> | ||
<Layout flexBasis={[20, 30, 40]} flexShrink={0} /> | ||
<Column width='100%'> | ||
<Layout flexBasis={[80, 100, 142]} flexShrink={0} /> | ||
<Box width={['100%', '100%', 1050]}> | ||
<Text | ||
textTransform='uppercase' | ||
fontFamily='secondary' | ||
fontWeight='bold' | ||
fontSize={['medium', 'semiRegular', 'mild', 'big']} | ||
lineHeight='default' | ||
color='text.smokyWhite' | ||
> | ||
{privacyPolicyData?.title} | ||
</Text> | ||
</Box> | ||
<Layout flexBasis={[20, 30, 50]} flexShrink={0} /> | ||
<Column> | ||
{privacyPolicyData?.content?.map((item) => ( | ||
<React.Fragment key={uniqid()}> | ||
<Row> | ||
<Text | ||
fontWeight='medium' | ||
fontSize={['semiMedium', 'regular', 'large']} | ||
lineHeight='primary' | ||
color='text.smokyWhite' | ||
> | ||
{item?.title} | ||
</Text> | ||
</Row> | ||
<Layout flexBasis={[4, 6, 8]} flexShrink={0} /> | ||
<Row> | ||
<Text | ||
opacity='50%' | ||
fontWeight='medium' | ||
fontSize={['micro', 'middling', 'medium']} | ||
lineHeight='primary' | ||
color='text.smokyWhite' | ||
> | ||
{item?.description} | ||
</Text> | ||
<Layout width={[16, 100, 200]} flexShrink={0} /> | ||
</Row> | ||
<Layout flexBasis={[16, 24, 40]} /> | ||
</React.Fragment> | ||
))} | ||
</Column> | ||
<Layout flexBasis={[32, 40, 150]} flexShrink={0} /> | ||
</Column> | ||
<Layout flexBasis={[32, 40, 150]} flexShrink={0} /> | ||
</Column> | ||
<Layout flexBasis={[20, 30, 40]} flexShrink={0} /> | ||
</Box> | ||
</Row> | ||
) | ||
<Layout flexBasis={[20, 30, 40]} flexShrink={0} /> | ||
</Box> | ||
</Row> | ||
) | ||
} | ||
|
||
export { PrivacyPolicyBlock } |
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