forked from deriv-com/deriv-app
-
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.
Kate / DTRA-269 / [Package 2] Tech debt TS + refactoring of Trader pa…
…ckage (deriv-com#9284) * fix: ts-migrate screen small * fix: sass was unable to be found * chore: add key files from prev branch * chore: empty commit * Maryia/dtra-279/TS migration [Trader]: TradeModals, MarketUnavailableModal & UnsupportedContractModal (#16) * maryia/WEBREL-323/feat: ts migration of base-store (#18) * chore: start ts migration of base-store * chore: add more types to BaseStore * chore: added more types to base-store * chore: added more types to base-store * chore: finalize base-store ts migration * chore: reorder imports * Maryia/webrel-483/TS migration of ContractType function (#17) * chore: start ts migration * chore: continue ts migration of contract-types * chore: add more types to contract-types * chore: add type for getContractValues return value * chore: improve reduce types * fix: sonarcloud issues (#19) * chore: update reg exp * chore: remove code smell * chore: remove security hotspot * chore: update reg exp * chore: update reg exp to prev version * fix: conflict * fix: ts error * refactor: apply suggestions * fix: resolve more conflicts * fix: conflicts in start date * fix: type of onchangestartdate * fix: type of contract cat list in usetraderstore * fix: types in contract type and allow equals * refactor: aplly part of suggestions * refactor: remove unused type * refactor: remove wrong types * refactor: types of time * refactor: revert changes * chore: empty commit * fix: more conflicts --------- Co-authored-by: Henry Hein <henry@regentmarkets.com> Co-authored-by: Akmal Djumakhodjaev <akmal@binary.com> Co-authored-by: Maryia <103177211+maryia-deriv@users.noreply.github.com>
- Loading branch information
1 parent
d35772f
commit 21d2e08
Showing
29 changed files
with
461 additions
and
348 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
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
3 changes: 0 additions & 3 deletions
3
packages/trader/src/App/Components/Elements/Modals/MarketUnavailableModal/index.js
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
packages/trader/src/App/Components/Elements/Modals/MarketUnavailableModal/index.ts
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,3 @@ | ||
import MarketUnavailableModal from './market-unavailable'; | ||
|
||
export default MarketUnavailableModal; |
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
2 changes: 1 addition & 1 deletion
2
packages/trader/src/App/Components/Elements/Modals/ServicesErrorModal/constants.ts
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
2 changes: 1 addition & 1 deletion
2
.../Modals/UnsupportedContractModal/index.js → .../Modals/UnsupportedContractModal/index.ts
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,3 +1,3 @@ | ||
import UnsupportedContractModal from './unsupported-contract-modal.jsx'; | ||
import UnsupportedContractModal from './unsupported-contract-modal'; | ||
|
||
export default UnsupportedContractModal; |
35 changes: 0 additions & 35 deletions
35
...rc/App/Components/Elements/Modals/UnsupportedContractModal/unsupported-contract-modal.jsx
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
...rc/App/Components/Elements/Modals/UnsupportedContractModal/unsupported-contract-modal.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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
import { Dialog } from '@deriv/components'; | ||
import { localize, Localize } from '@deriv/translations'; | ||
import { website_name } from '@deriv/shared'; | ||
import { observer, useStore } from '@deriv/stores'; | ||
|
||
type TUnsupportedContractModalProps = { | ||
is_loading?: boolean; | ||
is_visible?: boolean; | ||
onClose: () => void; | ||
onConfirm: () => void; | ||
}; | ||
|
||
const UnsupportedContractModal = observer( | ||
({ is_loading, is_visible: is_modal_visible, onConfirm, onClose }: TUnsupportedContractModalProps) => { | ||
const { ui } = useStore(); | ||
const { disableApp, enableApp, is_unsupported_contract_modal_visible } = ui; | ||
const is_visible = !!(is_unsupported_contract_modal_visible || is_modal_visible); | ||
|
||
return ( | ||
<Dialog | ||
title={localize('We’re working on it')} | ||
confirm_button_text={localize('Stay on {{website_domain}}', { website_domain: website_name })} | ||
cancel_button_text={localize('Go to Binary.com')} | ||
onConfirm={onConfirm} | ||
onCancel={onClose} | ||
disableApp={disableApp} | ||
enableApp={enableApp} | ||
is_loading={is_loading} | ||
is_closed_on_cancel | ||
is_visible={is_visible} | ||
> | ||
<Localize i18n_default_text='You’ve selected a trade type that is currently unsupported, but we’re working on it.' /> | ||
</Dialog> | ||
); | ||
} | ||
); | ||
|
||
export default UnsupportedContractModal; |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import TradeModals from './trade-modals'; | ||
|
||
export default TradeModals; |
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
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
Oops, something went wrong.