Changed input in address suggestion to use input component
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
import React, { useState, useRef, ChangeEvent, useEffect } from 'react';
|
import React, { useState, useRef, ChangeEvent, useEffect } from 'react';
|
||||||
|
import Input from '@/app/components/Input';
|
||||||
|
|
||||||
interface AddressSuggestionsProps {
|
interface AddressSuggestionsProps {
|
||||||
address: string;
|
address: string;
|
||||||
@ -98,15 +99,14 @@ const AddressSuggestions: React.FC<AddressSuggestionsProps> = ({ address, setAdd
|
|||||||
}, [postcode, setCity]);
|
}, [postcode, setCity]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative mb-4">
|
<div className="relative">
|
||||||
<label htmlFor="address" className="block text-sm font-medium text-gray-700">Address</label>
|
<Input
|
||||||
<input
|
|
||||||
id="address"
|
id="address"
|
||||||
type="text"
|
type="text"
|
||||||
value={address}
|
value={address}
|
||||||
onChange={handleAddressChange}
|
setChange={handleAddressChange}
|
||||||
className="mt-1 p-2 block w-full border border-gray-300 rounded-md shadow-sm"
|
|
||||||
required
|
required
|
||||||
|
label='Address'
|
||||||
/>
|
/>
|
||||||
{showSuggestions && addressSuggestions.length > 0 && (
|
{showSuggestions && addressSuggestions.length > 0 && (
|
||||||
<ul ref={suggestionListRef} className="absolute z-50 w-full bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-y-auto">
|
<ul ref={suggestionListRef} className="absolute z-50 w-full bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-y-auto">
|
||||||
|
|||||||
Reference in New Issue
Block a user