@@ -90,56 +90,72 @@ export const StyledMoreIcon = styled.img`
9090` ;
9191
9292interface LocationProps {
93+ id : string ;
9394 lat : number ;
9495 lng : number ;
9596 text : string ;
97+ subtext : string ;
9698}
9799
98100const AnyReactComponent : FC < React . PropsWithChildren < LocationProps > > = ( {
99101 text,
102+ subtext,
100103} ) => (
101104 < div
102105 style = { {
103106 color : Color . WHITE ,
104107 background : Color . LIGHT_BLUE ,
105108 padding : "15px 10px" ,
106109 display : "inline-flex" ,
107- textAlign : "center" ,
110+ width : "fit-content" ,
111+ textAlign : "left" ,
108112 alignItems : "center" ,
109113 justifyContent : "center" ,
110- borderRadius : "25%" ,
111- width : "100px" ,
112- height : "70px" ,
114+ borderRadius : "10%" ,
113115 boxShadow : "1px 1px 1px darkgrey" ,
114116 transform : "translate(-50%, -50%)" ,
117+ position : "absolute" ,
115118 } }
116119 >
117120 < a
118121 style = { {
119122 textDecoration : "none" ,
120- fontWeight : "bold" ,
121123 color : Color . WHITE ,
122- fontSize : "1.3em " ,
124+ fontSize : "1 rem " ,
123125 } }
124126 href = "https://goo.gl/maps/qaT5mCmi8ZkgCmteA"
125127 rel = "noreferrer"
126128 target = "_blank"
127129 >
128- < img src = "/images/LocationIcon.svg" alt = "La Farga" height = { 24 } / >
129- { text }
130+ < strong > { text } </ strong >
131+ < p > { subtext } </ p >
130132 </ a >
131133 </ div >
132134) ;
133135
134136export const Venue : FC < React . PropsWithChildren < unknown > > = ( ) => {
135137 const { width } = useWindowSize ( ) ;
136- const location : LocationProps = {
137- text : "La Farga" ,
138- lat : 41.362 ,
139- lng : 2.1044 ,
138+ const defaultLocation = {
139+ lat : 41.361 ,
140+ lng : 2.1041 ,
140141 } ;
142+ const locations : Array < LocationProps > = [
143+ {
144+ id : "ab4186ca-dc31-419e-a684-f3e6d0e83e6e" ,
145+ text : "Conference Talks" ,
146+ subtext : "Carrer Barcelona, 12" ,
147+ lat : 41.361529516457 ,
148+ lng : 2.10421032792683 ,
149+ } ,
150+ {
151+ id : "a6887def-70bd-473d-ac61-cd28392b3568" ,
152+ text : "Workshops" ,
153+ subtext : "Carrer Girona, 15" ,
154+ lat : 41.36171121328454 ,
155+ lng : 2.103491331747179 ,
156+ } ,
157+ ] ;
141158 const key = import . meta. env . VITE_APP_MAP_API_KEY ?? "" ;
142-
143159 return (
144160 < StyledVenue >
145161 < TitleSection
@@ -205,14 +221,21 @@ export const Venue: FC<React.PropsWithChildren<unknown>> = () => {
205221 < div className = "map" >
206222 < GoogleMapReact
207223 bootstrapURLKeys = { { key } }
208- defaultCenter = { location }
209- defaultZoom = { 16 }
224+ defaultCenter = { defaultLocation }
225+ center = { defaultLocation }
226+ defaultZoom = { 11 }
227+ zoom = { 18 }
210228 >
211- < AnyReactComponent
212- lat = { location . lat }
213- lng = { location . lng }
214- text = { location . text }
215- />
229+ { locations . map ( ( location ) => (
230+ < AnyReactComponent
231+ id = { location . id }
232+ key = { location . id }
233+ lat = { location . lat }
234+ lng = { location . lng }
235+ subtext = { location . subtext }
236+ text = { location . text }
237+ />
238+ ) ) }
216239 </ GoogleMapReact >
217240 </ div >
218241 </ section >
0 commit comments