-
Notifications
You must be signed in to change notification settings - Fork 299
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
Adrienne / Changed layout for PM cards list in Ads page #5284
Adrienne / Changed layout for PM cards list in Ads page #5284
Conversation
…ards layout in Add PM method Ads page is now grid layout
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…eriv/deriv-app into bug-57367-alignment-issues-PM
A production App ID was automatically generated for this PR. (log)
Click here to copy & paste above information.
|
Unstage eslint formatted file `icons.js`
@@ -42,6 +38,7 @@ const CreateAdFormPaymentMethods = ({ is_sell_advert, onSelectPaymentMethods }) | |||
} | |||
}; | |||
|
|||
// eslint-disable-next-line no-unused-vars |
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.
Why is this added here?
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.
Eslint was commenting on it previously being unused while its being used as a prop in the new component (edit: just ran npm test
and now its passed, will remove the comment asap)
packages/p2p/src/components/my-ads/ad-form-payment-methods-list.jsx
Outdated
Show resolved
Hide resolved
|
||
&--scroll { | ||
overflow: auto; | ||
} |
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.
Removed margin-bottom: 7.5rem
as it is a bug added in previous PR which will be fixed in card Task #64742
@@ -19,6 +19,11 @@ const PaymentMethodsList = () => { | |||
|
|||
const independent_categories = ['bank_transfer', 'other']; | |||
|
|||
const sortPaymentMethodsListMethods = payment_methods_list_methods => { | |||
const order = ['bank_transfer', 'e_wallet', 'other']; | |||
return payment_methods_list_methods.sort((i, j) => order.indexOf(i.method) - order.indexOf(j.method)); |
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.
is_open={my_ads_store.is_quick_add_modal_open} | ||
title={localize('Add payment method')} | ||
title={localize('Add payment methods')} | ||
width='440px' |
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.
Should we be using px here? why not use rem instead
})} | ||
); | ||
}) | ||
.sort(payment_method_card_node => |
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.
Added sorting to sort cards that has is_add
to true to be rendered at the end of the list
); | ||
return matching_payment_methods.length > 0 ? ( | ||
matching_payment_methods.map(payment_method => ( | ||
{payment_method_names |
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.
Prettier formatted line 226 to line 260, only added sort()
method after map()
at the end
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.
LGTM
a8429b2
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Changes:
Please include a summary of the change and which issue is fixed below:
When you need to add unit test
When you need to add integration test
Test coverage checklist (for reviewer)
Type of change