Skip to content

Commit

Permalink
hotfix: contract details for digits trade types from open positions w…
Browse files Browse the repository at this point in the history
…ere showing error (binary-com#7550)

Co-authored-by: HENRY <henry@regentmarkets.com>
Co-authored-by: Carol Sachdeva <58209918+carol-deriv@users.noreply.github.com>
  • Loading branch information
3 people authored and Carol Sachdeva committed Feb 9, 2023
1 parent d4b6147 commit 6cc1f9c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ import Icon from '../icon';

type TSwipeableWrapper = {
className?: string;
onChange: (prop?: number) => void;
onChange?: (prop?: number) => void;
is_disabled?: boolean;
} & SwipeableProps;

const SwipeableWrapper = ({ children, className, onChange, ...props }: React.PropsWithChildren<TSwipeableWrapper>) => {
const [active_index, setActiveIndex] = React.useState(0);

React.useEffect(() => {
onChange(active_index);
onChange?.(active_index);
return () => {
// Makes an empty callback when unmounted so that we can reset
onChange();
onChange?.();
};
}, [active_index, onChange]);

Expand Down

0 comments on commit 6cc1f9c

Please sign in to comment.