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.
george / rm65047 / convert routes, cashier, error-component component…
…s to TS (deriv-com#6361) * perf(cashier routes): convert csahier routes to TS * perf(cashier routes): convert error-component to TS * refactor(error-dialog, types): refactor error-dialog types, move error type to shared types * perf(cashier): convert cashier to TS * perf(types): refactor types * refactor(routes with sub routes): refactor default subroute * refactor(types): add/refactor server error type * test: refactor pathname * refactor(route types): refactor route types * fix: fix ts error in React.Suspense
- Loading branch information
1 parent
1e0e233
commit 01024ab
Showing
28 changed files
with
246 additions
and
183 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 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 Cashier from './cashier'; | ||
|
||
export default Cashier; |
File renamed without changes.
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 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,32 @@ | ||
import React from 'react'; | ||
import { Switch } from 'react-router-dom'; | ||
import { Localize } from '@deriv/shared'; | ||
import getRoutesConfig from 'Constants/routes-config'; | ||
import RouteWithSubRoutes from './route-with-sub-routes'; | ||
|
||
type TBinaryRoutesProps = { | ||
is_logged_in: boolean; | ||
is_logging_in: boolean; | ||
}; | ||
|
||
const Loading = () => { | ||
return ( | ||
<div> | ||
<Localize i18n_default_text='Loading...' /> | ||
</div> | ||
); | ||
}; | ||
|
||
const BinaryRoutes = (props: TBinaryRoutesProps) => { | ||
return ( | ||
<React.Suspense fallback={<Loading />}> | ||
<Switch> | ||
{getRoutesConfig().map((route, idx: number) => ( | ||
<RouteWithSubRoutes key={idx} {...route} {...props} /> | ||
))} | ||
</Switch> | ||
</React.Suspense> | ||
); | ||
}; | ||
|
||
export default BinaryRoutes; |
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/cashier/src/containers/routes/error-component/index.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.