@@ -43,10 +43,11 @@ function VenueSelector({
4343 </ Paragraph >
4444 </ motion . div >
4545
46- < AnimatePresence >
46+ < AnimatePresence mode = "wait" >
4747 { ! selectedVenue && (
4848 < motion . div
49- className = "mt-20"
49+ key = "venue-list"
50+ className = "mt-20 min-h-[220px]"
5051 variants = { containerVariants }
5152 initial = "hidden"
5253 animate = "visible"
@@ -68,43 +69,50 @@ function VenueSelector({
6869 </ div >
6970 </ motion . div >
7071 ) }
71- </ AnimatePresence >
7272
73- { selectedVenue && (
74- < div className = "mt-20 text-left sm:mt-12" >
75- < Button
76- type = "button"
77- className = "mb-10 flex items-center sm:mb-6"
78- onClick = { ( ) => onVenueSelect ( null ) }
79- outline
80- icon = { < Arrow className = "w-4 rotate-180" /> }
81- iconPosition = "left"
73+ { selectedVenue && (
74+ < motion . div
75+ key = "venue-details"
76+ className = "mt-20 text-left sm:mt-12 min-h-[220px]"
77+ variants = { containerVariants }
78+ initial = "hidden"
79+ animate = "visible"
80+ exit = "hidden"
8281 >
83- < div className = "ml-2 text-white text-md" >
84- { selectedVenue . country }
85- </ div >
86- </ Button >
82+ < Button
83+ type = "button"
84+ className = "mb-10 flex items-center sm:mb-6"
85+ onClick = { ( ) => onVenueSelect ( null ) }
86+ outline
87+ icon = { < Arrow className = "w-4 rotate-180" /> }
88+ iconPosition = "left"
89+ >
90+ < div className = "ml-2 text-white text-md" >
91+ { selectedVenue . country }
92+ </ div >
93+ </ Button >
8794
88- { selectedVenue . cities . length > 0 ? (
89- < div className = "grid grid-cols-3 gap-4 lg:grid-cols-2 sm:grid-cols-1" >
90- { selectedVenue . cities . map ( ( city ) => (
91- < Button
92- type = "button"
93- outline
94- key = { city . name }
95- className = "text-white border border-white/20 px-6 py-3 rounded-full text-center"
96- >
97- { city . name }
98- </ Button >
99- ) ) }
100- </ div >
101- ) : (
102- < Paragraph className = "text-gray-300 text-center" >
103- No meetups in this country yet. Stay tuned!
104- </ Paragraph >
105- ) }
106- </ div >
107- ) }
95+ { selectedVenue . cities . length > 0 ? (
96+ < div className = "grid grid-cols-3 gap-4 lg:grid-cols-2 sm:grid-cols-1" >
97+ { selectedVenue . cities . map ( ( city ) => (
98+ < Button
99+ type = "button"
100+ outline
101+ key = { city . name }
102+ className = "text-white border border-white/20 px-6 py-3 rounded-full text-center"
103+ >
104+ { city . name }
105+ </ Button >
106+ ) ) }
107+ </ div >
108+ ) : (
109+ < Paragraph className = "text-gray-300 text-center" >
110+ No meetups in this country yet. Stay tuned!
111+ </ Paragraph >
112+ ) }
113+ </ motion . div >
114+ ) }
115+ </ AnimatePresence >
108116 < motion . div variants = { itemVariants } >
109117 < Paragraph className = "mt-10" typeStyle = "body-md" >
110118 Please be sure to read and understand our Terms & Conditions for { ' ' }
0 commit comments