Skip to content

Commit

Permalink
refactor :BuyFiatModal props
Browse files Browse the repository at this point in the history
  • Loading branch information
r41ph committed Oct 24, 2024
1 parent 100307d commit df94df2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ interface BuyFiatModalProps extends BuyFiatModalContent {
}

export const BuyFiatModal = ({
title,
content,
buttons,
modalContent,
fiatModalState,
onClose,
handleClick,
}: BuyFiatModalProps) => {
const { title, content, buttons } = modalContent;
return (
<Modal
open={fiatModalState.openModal}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ interface BuyFiatModalButton {
}

export interface BuyFiatModalContent {
title: string;
content: React.ReactNode;
buttons: BuyFiatModalButton[];
modalContent: {
title: string;
content: React.ReactNode;
buttons: BuyFiatModalButton[];
};
}
4 changes: 1 addition & 3 deletions web-marketplace/src/pages/BuyCredits/BuyCredits.Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,7 @@ export const BuyCreditsForm = ({
/>
{fiatModalContent.current && (
<BuyFiatModal
title={fiatModalContent.current.title}
content={fiatModalContent.current.content}
buttons={fiatModalContent.current.buttons}
modalContent={fiatModalContent.current.modalContent}
fiatModalState={fiatModalState}
onClose={setFiatModalState}
handleClick={action => {
Expand Down

0 comments on commit df94df2

Please sign in to comment.