Skip to content
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

[feat]: Add support for Key value pair in AccessType #575

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

shraddha-kesari
Copy link
Contributor

Comment on lines 53 to 64
onClick={() => handleOptionClick(group.name, selectedSubscriptions[group.name])}
>
{selectedSubscriptions[group.name]?.duration_length} 
{selectedSubscriptions[group.name]?.duration_length === 1
? selectedSubscriptions[group.name]?.duration_unit.substring(
0,
selectedSubscriptions[group.name]?.duration_unit.length - 1
)
: selectedSubscriptions[group.name]?.duration_unit}
 
{selectedSubscriptions[group.name]?.price_cents / 100} 
{selectedSubscriptions[group.name]?.price_currency}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the same set of statements are repeated to access properties, fundamentals like variables are to be used!

Please consider programming practices over copy paste..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -22,8 +22,8 @@ publisher:
redirect_Url: "<Domain>/api/auth/v1/oauth/token"
callback_Url: "Callback Url"
accesstypeConfig:
key: "Aw4ujaqhpn8aVMT7yzQawSyZ"
accessTypeBkIntegrationId: 455
key: "yTKoDn8R1d4AY651ZPvGDUq4"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch back to stg creds, do not commit prod keys or domains

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for QA testing. On staging, subscription page doesn't work. It only works on prod.
After testing, will change it back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use BK!, do not commit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay

<div styleName="selected-option" onClick={() => handleOptionClick(group.name, groupName)}>
{groupName.duration_length}&nbsp;
{groupName.duration_length === 1
? groupName.duration_unit.substring(0, groupName.duration_unit.length - 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dry! Again!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

styleName={`option ${selectedOption === plan ? "option-select" : ""}`}
onClick={() => handleOptionClick(group.name, plan)}
>
{1 + index})&nbsp;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its a design change for showing like this 1)

{groupDurationLength === 1
? groupDurationUnit.substring(0, groupDurationUnit.length - 1)
: groupDurationUnit}
&nbsp;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove   across the file, let's use CSS to achieve it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay

{plan.price_currency} &nbsp;
{planCustomAttributes &&
planCustomAttributes.map((attribute, index) => (
<div key={index}>{attribute.value && renderRichText(attribute.value)}</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

index shouldnt be a key

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@@ -22,8 +22,8 @@ publisher:
redirect_Url: "<Domain>/api/auth/v1/oauth/token"
callback_Url: "Callback Url"
accesstypeConfig:
key: "Aw4ujaqhpn8aVMT7yzQawSyZ"
accessTypeBkIntegrationId: 455
key: "yTKoDn8R1d4AY651ZPvGDUq4"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use BK!, do not commit

return (
<>
<div
key={index}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key shouldn't be index

)}
<div>
{group.subscription_plans.map((plan, index) => {
const durationUnit = plan && plan.duration_unit;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plan will always be truthy

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

destructure to a single line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants