-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shayan/52349/react17 migration #6908
Changes from 37 commits
04832cb
d018552
13a0864
8c07088
5bc95aa
2c6e0c9
62d4577
7ac8796
40a27d7
56b5002
6bca951
0b11e9f
976f106
4ebb034
c0d521e
4dd4036
42349cb
1c34ad8
a091263
cd18cbb
5248cc9
1fcc0bf
e015475
2d4e390
0b97f97
8357b98
6fdd64e
08d1e7c
047e447
94fae2e
91dc7cd
176823d
81e3d77
e8ba039
4ee5c56
13575a1
b90729d
de81fd4
b92e809
6e6b2cc
4b23949
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ const AccountLimitsExtraInfo = ({ message, ...props }: TAccountLimitsExtraInfo) | |
icon='info' | ||
is_bubble_hover_enabled | ||
message={message} | ||
zIndex={9999} | ||
zIndex='9999' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ts error fix There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this affect the design? |
||
{...props} | ||
/> | ||
); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,11 +52,11 @@ | |
"moment": "^2.29.2", | ||
"prop-types": "^15.7.2", | ||
"qrcode.react": "^1.0.0", | ||
"react": "^16.14.0", | ||
"react-content-loader": "^4.3.2", | ||
"react-dom": "^16.14.0", | ||
"react": "^17.0.2", | ||
"react-content-loader": "^6.2.0", | ||
"react-dom": "^17.0.2", | ||
"react-loadable": "^5.5.0", | ||
"react-pose": "^4.0.10", | ||
"framer-motion":"^6.5.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"react-router": "^5.2.0", | ||
"react-router-dom": "^5.2.0" | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,6 @@ | |
"eslint-plugin-react-hooks": "^4.2.0", | ||
"lint-staged": "^10.4.0", | ||
"node-sass": "^7.0.1", | ||
"react": "^16.14.0", | ||
"sass-loader": "^12.6.0", | ||
"sass-resources-loader": "^2.1.1", | ||
"style-loader": "^1.2.1", | ||
|
@@ -69,24 +68,23 @@ | |
}, | ||
"dependencies": { | ||
"@contentpass/zxcvbn": "^4.4.3", | ||
"@deriv/deriv-onboarding": "^1.0.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't need this anymore |
||
"@deriv/shared": "^1.0.0", | ||
"@deriv/translations": "^1.0.0", | ||
"classnames": "^2.2.6", | ||
"gh-pages": "^2.1.1", | ||
"glob": "^7.1.5", | ||
"lodash.throttle": "^4.1.1", | ||
"prop-types": "^15.7.2", | ||
"react-content-loader": "^4.3.2", | ||
"react-content-loader": "^6.2.0", | ||
"react-div-100vh": "^0.3.8", | ||
"react-dom": "^16.14.0", | ||
"react-drag-drawer": "^3.3.4", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"react-dropzone": "11.0.1", | ||
"react-pose": "^4.0.10", | ||
"framer-motion":"^6.5.1", | ||
"react-router-dom": "^5.2.0", | ||
"react-swipeable": "^5.5.1", | ||
"react-tiny-popover": "^5.1.0", | ||
"react-transition-group": "4.4.2", | ||
"react-virtualized": "^9.22.2" | ||
"react-swipeable": "^6.2.1", | ||
"react-tiny-popover": "^7.0.1", | ||
"react-transition-group": "^4.4.2", | ||
"@enykeev/react-virtualized": "^9.22.4-mirror.1" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
type TSize = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
width: number; | ||
height: number; | ||
}; | ||
|
||
type TProps = { | ||
children?: ((props: TSize) => React.ReactNode) | React.ReactNode; | ||
}; | ||
|
||
declare module '@enykeev/react-virtualized/dist/es/AutoSizer' { | ||
export const AutoSizer = (props: TProps): JSX.Element => JSX.Element; | ||
|
||
export default AutoSizer; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
// Imported as below to save on bundle size due to faulty tree-shaking. | ||
import AutoSizer from 'react-virtualized/dist/es/AutoSizer'; | ||
/* eslint @typescript-eslint/triple-slash-reference: "off" */ | ||
/// <reference path="AutoSizer.d.ts" /> | ||
|
||
import AutoSizer from '@enykeev/react-virtualized/dist/es/AutoSizer'; | ||
import './autosizer.scss'; | ||
|
||
export default AutoSizer; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
import { Swipeable } from 'react-swipeable'; | ||
import { useSwipeable } from 'react-swipeable'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. refactored this component based on the latest version of |
||
import Card from './carousel-card'; | ||
import Nav from './carousel-nav'; | ||
import Icon from '../icon'; | ||
|
@@ -79,8 +79,13 @@ const Carousel = ({ | |
if (onItemSelect) onItemSelect(active_index); | ||
}, [active_index, onItemSelect]); | ||
|
||
const swipe_handlers = useSwipeable({ | ||
onSwipedLeft: handleNextClick, | ||
onSwipedRight: handlePrevClick, | ||
}); | ||
|
||
return ( | ||
<Swipeable onSwipedLeft={handleNextClick} onSwipedRight={handlePrevClick} className={className}> | ||
<div {...swipe_handlers} className={className}> | ||
<div className={classNames('dc-carousel', { 'dc-carousel--mt5': is_mt5 })}> | ||
{sliced_list_length > 1 && ( | ||
<Nav | ||
|
@@ -160,7 +165,7 @@ const Carousel = ({ | |
/> | ||
)} | ||
</div> | ||
</Swipeable> | ||
</div> | ||
); | ||
}; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the previous library is not compatible with react-17 , I've replaced it with the forked version.
please check the below comment:
bvaughn/react-virtualized@005be24#commitcomment-75710883