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

Pincode Input Dialog with Area Suggestions and Close Icon #92

Merged
merged 2 commits into from
Oct 12, 2024

Conversation

dhruvishah122
Copy link
Contributor

his contribution adds a dialog box component for entering and validating pincodes. When a valid pincode is entered, the component fetches and displays a list of area suggestions from an external API. It also includes an option to close the dialog via a cross (close) icon for better user experience.

Key Features:
Pincode Validation:

The user is required to enter a 6-digit pincode. Upon submission, if the pincode is valid, area suggestions are fetched and displayed.
Alerts the user if the pincode is invalid or if no area is selected.
Area Suggestions:

Uses the https://api.postalpincode.in/ API to fetch post office areas based on the entered pincode.
Suggestions are displayed dynamically as the user enters a valid pincode.
Allows the user to select an area from the suggestions list, which is saved locally.
Close Icon:

A cross (close) icon has been added to the top-right corner of the dialog to allow users to easily close the popup.
Improves user experience by providing a quick way to dismiss the dialog.
LocalStorage Integration:

Stores the selected pincode and area locally using localStorage, ensuring persistence across sessions.
Tech Stack:
React: Manages the state and renders the dialog UI.
Material-UI: Utilized for dialog, button, input, and icons, ensuring a clean and responsive UI.
API Integration: Fetches area suggestions from a public pincode API.

Copy link

vercel bot commented Oct 7, 2024

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

Name Status Preview Comments Updated (UTC)
ratna-supermarket-mini-project ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 6:05am
ratna-supermarket-x3ah ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 6:05am

Copy link

vercel bot commented Oct 7, 2024

@dhruvishah122 is attempting to deploy a commit to the minavkaria's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Owner

@MinavKaria MinavKaria left a comment

Choose a reason for hiding this comment

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

Welcome to Our repository, @dhruvishah122! 🎊 Thank you so much for taking the time to point this out.

@dhruvishah122
Copy link
Contributor Author

Feature: Pincode Input Dialog with Area Suggestions and Close Icon

@dhruvishah122
Copy link
Contributor Author

can u pls merge this PR

@MinavKaria
Copy link
Owner

@dhruvishah122 The only thing you added is close button right ?

@dhruvishah122
Copy link
Contributor Author

yes

@MinavKaria MinavKaria merged commit 89bf756 into MinavKaria:main Oct 12, 2024
3 checks passed
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