Firm-Collective / One-Accord

https://one-accord.vercel.app
4 stars 4 forks source link

country-state-city dropdown's work now #229

Open saitamasan0220 opened 1 month ago

saitamasan0220 commented 1 month ago

Added country/state/city dropdown menu's

  1. State Variables Initialization:

    • Added state variables to manage dropdown selections for country, state, and city.
    • Added state variables for storing country, state, and city data.
  2. Helper Functions for Dropdown Rendering:

    • Introduced boolean functions to check if state and city data have been set to ensure the dropdown menus render correctly.
  3. Metadata State Variables:

    • Added state variables to hold selected country, state, and city metadata.
  4. useEffect Hooks for Data Fetching:

    • Added useEffect hooks to update state data when a country is selected and city data when a state is selected.
    • Added useEffect hooks to format state and city data for dropdown options.
  5. Dropdown Callback Functions:

    • Introduced callback functions to handle the selection of country, state, and city, updating the corresponding state variables and metadata.
  6. Country, State, City Section in Form:

    • Added country, state, and city dropdowns in the form with conditional rendering based on whether state and city data have been set.

These changes introduce dynamic dropdowns for selecting country, state, and city, using hooks for data fetching and formatting, and conditional rendering to ensure the form updates correctly based on user selections.

vercel[bot] commented 1 month ago

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

Name Status Preview Comments Updated (UTC)
one-accord ❌ Failed (Inspect) Jun 3, 2024 4:52pm