Skip to content

Commit

Permalink
Merge pull request #194 from ahmed-deriv/ahmed/DAPI-853/feat--add-bus…
Browse files Browse the repository at this point in the history
…iness-partner-terms

ahmed/DAPI-853/feat--add-business-partner-terms
  • Loading branch information
ahmed-deriv authored Jan 20, 2025
2 parents 5a8a3df + 38b5545 commit 9a1d85f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
3 changes: 3 additions & 0 deletions i18n/en/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,9 @@
"The server is currently unable to handle the request due to a temporary overload or maintenance of the server. Please try again later.": {
"message": "The server is currently unable to handle the request due to a temporary overload or maintenance of the server. Please try again later."
},
"and General Business Partners": {
"message": "and General Business Partners"
},
"Copied": {
"message": "Copied"
}
Expand Down
7 changes: 5 additions & 2 deletions i18n/fr/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,10 @@
"message": "Vous avez créé le nombre maximum de jetons."
},
"By registering your application, you acknowledge that you‘ve read and accepted the Deriv API": {
"message": "En enregistrant votre demande, vous reconnaissez avoir lu et accepté"
"message": "En enregistrant votre demande, vous reconnaissez avoir lu et accepté l'API Deriv"
},
"terms and conditions": {
"message": "les conditions générales de l'API de Deriv"
"message": "termes et conditions"
},
"Enter your app's name": {
"message": "Entrez le nom de votre application"
Expand Down Expand Up @@ -1119,6 +1119,9 @@
"The server is currently unable to handle the request due to a temporary overload or maintenance of the server. Please try again later.": {
"message": "Le serveur est actuellement incapable de traiter la requête en raison d'une surcharge temporaire ou d'une maintenance du serveur. Veuillez réessayer plus tard."
},
"and General Business Partners": {
"message": "et partenaires commerciaux généraux"
},
"Copied": {
"message": "Copié"
}
Expand Down
29 changes: 17 additions & 12 deletions src/features/dashboard/components/app-register/app-register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const TermsAndConditions: React.FC<TTermsAndConditionsProps> = ({ register }) =>
<CustomCheckbox id='tnc_approval' name='tnc_approval' register={register}>
<label htmlFor='tnc_approval' className='app-register-container__tnc__label'>
<Text>
{translate({ message: `By registering your application, you acknowledge that you‘ve read and accepted the Deriv API` })} {' '}
{translate({
message: `By registering your application, you acknowledge that you‘ve read and accepted the Deriv API`,
})}{' '}
<Link
href='https://deriv.com/tnc/business-partners-api-user.pdf'
target='_blank'
Expand All @@ -35,6 +37,16 @@ const TermsAndConditions: React.FC<TTermsAndConditionsProps> = ({ register }) =>
>
<Translate>terms and conditions</Translate>
</Link>
{' '}
{translate({ message: 'and General Business Partners' })}{' '}
<Link
href='https://docs.deriv.com/tnc/business-partners-general-terms.pdf'
target='_blank'
rel='noreferrer'
className='app-register-container__tnc__link'
>
<Translate>terms and conditions</Translate>
</Link>
</Text>
</label>
</CustomCheckbox>
Expand Down Expand Up @@ -73,12 +85,8 @@ const AppRegister: React.FC = () => {
const has_error = Object.entries(errors).length !== 0;
const { deviceType } = useDeviceType();
const is_desktop = deviceType === 'desktop';
const {
setAppRegisterModalOpen,
updateCurrentTab,
getApps,
handleCurrentUpdatingItem,
} = useAppManager();
const { setAppRegisterModalOpen, updateCurrentTab, getApps, handleCurrentUpdatingItem } =
useAppManager();
const { send: registerApp, data, error, clear, is_loading } = useWS('app_register');
const [created_app_data, setCreatedAppData] = useState({});

Expand Down Expand Up @@ -118,7 +126,7 @@ const AppRegister: React.FC = () => {
if (error) {
clear();
}
}
};

return (
<>
Expand Down Expand Up @@ -149,10 +157,7 @@ const AppRegister: React.FC = () => {
<TermsAndConditions register={register('tnc_approval')} />
</div>
</form>
<AppRegisterSuccessModal
onCancel={handleConfigureLater}
onConfigure={handleAppConfigure}
/>
<AppRegisterSuccessModal onCancel={handleConfigureLater} onConfigure={handleAppConfigure} />
</>
);
};
Expand Down

0 comments on commit 9a1d85f

Please sign in to comment.