All files / app/termsConditions TermsConditions.tsx

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 283x   3x             3x 2x 2x 2x                              
import React, { FunctionComponent } from 'react';
 
import TermsConditionsField, { TermsConditionsType } from './TermsConditionsField';
 
export interface TermsConditionsProps {
    termsConditionsText?: string;
    termsConditionsUrl?: string;
}
 
export const TermsConditions: FunctionComponent<TermsConditionsProps> = ({
    termsConditionsUrl,
    termsConditionsText = '',
}) => (
    <>
        { termsConditionsUrl ?
            <TermsConditionsField
                name="terms"
                type={ TermsConditionsType.Link }
                url={ termsConditionsUrl }
            /> :
            <TermsConditionsField
                name="terms"
                terms={ termsConditionsText }
                type={ TermsConditionsType.TextArea }
            /> }
    </>
);