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

Update ProFreeSubcription.js #400

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Tanisha0708
Copy link
Contributor

here are the some changes did to improve efficiency, readability and maintanability Moved pricingPlans Outside the Component:

Why: Declaring pricingPlans inside the component redefines it every time the component renders, which is unnecessary and can impact performance slightly. Improvement: Moving pricingPlans outside the ProFreeSubscription component ensures it’s only defined once. Fixed Typo in Component Name:

Why: Consistent and correct naming is crucial for code readability and avoiding errors. Improvement: Renamed ProFreeSubcription to ProFreeSubscription to correct the typo. Added PropTypes for Type-Checking:

Why: PropTypes help with validating props, ensuring the right data types are passed to components, which is especially helpful in larger codebases. Improvement: Added PropTypes to ProFreeSubscription and PriceCard, defining expected types for props and default values. Conditional Styling with CSS Class:

Why: Instead of passing isHighlighted just to apply styling, using a conditional CSS class improves readability and modularity. Improvement: Added a highlighted CSS class to the PriceCard component to style highlighted cards (e.g., the PRO plan) in ProFreeSubscription.css. Improved CSS Modularity:

Why: Styling based on class names improves modularity, and moving styles out of inline logic is cleaner.
Improvement: Defined .highlighted and .pricing-container in the CSS file for consistent, reusable styling.

here are the some changes did to improve efficiency, readability and maintanability 
Moved pricingPlans Outside the Component:

Why: Declaring pricingPlans inside the component redefines it every time the component renders, which is unnecessary and can impact performance slightly.
Improvement: Moving pricingPlans outside the ProFreeSubscription component ensures it’s only defined once.
Fixed Typo in Component Name:

Why: Consistent and correct naming is crucial for code readability and avoiding errors.
Improvement: Renamed ProFreeSubcription to ProFreeSubscription to correct the typo.
Added PropTypes for Type-Checking:

Why: PropTypes help with validating props, ensuring the right data types are passed to components, which is especially helpful in larger codebases.
Improvement: Added PropTypes to ProFreeSubscription and PriceCard, defining expected types for props and default values.
Conditional Styling with CSS Class:

Why: Instead of passing isHighlighted just to apply styling, using a conditional CSS class improves readability and modularity.
Improvement: Added a highlighted CSS class to the PriceCard component to style highlighted cards (e.g., the PRO plan) in ProFreeSubscription.css.
Improved CSS Modularity:

Why: Styling based on class names improves modularity, and moving styles out of inline logic is cleaner.
Improvement: Defined .highlighted and .pricing-container in the CSS file for consistent, reusable styling.
Copy link

vercel bot commented Nov 2, 2024

@Tanisha0708 is attempting to deploy a commit to the vanshchauhan21's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

github-actions bot commented Nov 2, 2024

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@Tanisha0708
Copy link
Contributor Author

@vanshchauhan21 please once go through this pr

Copy link

vercel bot commented Nov 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
crypto-tracker ❌ Failed (Inspect) Nov 3, 2024 3:06pm

@vanshchauhan21
Copy link
Owner

@vanshchauhan21 please once go through this pr

Screenshot_20241103-114630
Hey please resolve this issue

@vanshchauhan21
Copy link
Owner

@vanshchauhan21 please once go through this pr

hey update me , have you resolve this issue ?

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

Successfully merging this pull request may close these issues.

2 participants