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 Input from '@/app/components/Input';
|
||||
|
||||
interface AddressSuggestionsProps {
|
||||
address: string;
|
||||
@ -98,15 +99,14 @@ const AddressSuggestions: React.FC<AddressSuggestionsProps> = ({ address, setAdd
|
||||
}, [postcode, setCity]);
|
||||
|
||||
return (
|
||||
<div className="relative mb-4">
|
||||
<label htmlFor="address" className="block text-sm font-medium text-gray-700">Address</label>
|
||||
<input
|
||||
<div className="relative">
|
||||
<Input
|
||||
id="address"
|
||||
type="text"
|
||||
value={address}
|
||||
onChange={handleAddressChange}
|
||||
className="mt-1 p-2 block w-full border border-gray-300 rounded-md shadow-sm"
|
||||
setChange={handleAddressChange}
|
||||
required
|
||||
label='Address'
|
||||
/>
|
||||
{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">
|
||||
|
||||
Reference in New Issue
Block a user