|
|
@ -35,14 +35,12 @@ const SectionGridFeaturePlaces: FC<SectionGridFeaturePlacesProps> = ({ |
|
|
|
const { countries, tours } = useContext(Context); |
|
|
|
const [countryTours, setCountryTours] = useState(); |
|
|
|
|
|
|
|
console.log(tours); |
|
|
|
|
|
|
|
useEffect(()=>{ |
|
|
|
handleChange("All") |
|
|
|
} , [tours , countries]) |
|
|
|
|
|
|
|
const handleChange = async (item) => { |
|
|
|
console.log(item , countries , tours); |
|
|
|
if (item ==="All"){ |
|
|
|
setCountryTours(tours.results); |
|
|
|
|
|
|
@ -52,11 +50,8 @@ const SectionGridFeaturePlaces: FC<SectionGridFeaturePlacesProps> = ({ |
|
|
|
(tour) => tour.destination_country === selected?.code |
|
|
|
); |
|
|
|
setCountryTours(selectedTours); |
|
|
|
console.log(selected); |
|
|
|
|
|
|
|
console.log(selectedTours);} |
|
|
|
} |
|
|
|
}; |
|
|
|
console.log(countries); |
|
|
|
// const renderCard = (stay: StayDataType) => {
|
|
|
|
// let CardName = StayCard;
|
|
|
|
// switch (cardType) {
|
|
|
|