Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit e28eeca

Browse files
feat: event location (#5424)
* feat: location to events (#4438) * Added the Location parameters * Updated docs with Location parameters * Updated the Location parameter * Updated location docs * Updated the location parameters --------- Co-authored-by: Eddie Jaoude <[email protected]> * feat: event location --------- Co-authored-by: Deb Chatterjee <[email protected]>
1 parent ff55b15 commit e28eeca

File tree

4 files changed

+36
-8
lines changed

4 files changed

+36
-8
lines changed

components/event/EventCard.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import Link from "../Link";
2-
import { FaMicrophoneAlt } from "react-icons/fa";
1+
import { FaMicrophoneAlt, FaMapPin } from "react-icons/fa";
32
import {
43
MdOutlineOnlinePrediction,
54
MdOutlinePeople,
65
MdOutlineArrowRightAlt,
76
} from "react-icons/md";
87
import { ReactMarkdown } from "react-markdown/lib/react-markdown";
98

9+
import Link from "../Link";
1010
import FallbackImage from "../FallbackImage";
1111

1212
export default function EventCard({ event, username }) {
@@ -76,6 +76,21 @@ export default function EventCard({ event, username }) {
7676
<ReactMarkdown className="text-sm text-gray-500 py-1 flex-wrap">
7777
{event.description}
7878
</ReactMarkdown>
79+
<p className="text-sm text-gray-800 py-1 flex gap-2 flex-wrap">
80+
{(event.isVirtual || (event.isInPerson && event.location)) && (
81+
<FaMapPin />
82+
)}
83+
<span>
84+
{event.isVirtual && "Remote"}
85+
{event.isVirtual &&
86+
event.isInPerson &&
87+
event.location &&
88+
" AND in "}
89+
{event.isInPerson &&
90+
event.location &&
91+
Object.values(event.location).join(", ")}
92+
</span>
93+
</p>
7994
</div>
8095
{username && (
8196
<Link

data/eddiejaoude/events/2023-07-27-wearedevelopers.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@
77
"start": "2023-07-27T09:00:00.000+00:00",
88
"end": "2023-07-28T17:00:00.000+00:00"
99
},
10+
"location": {
11+
"city": "Berlin",
12+
"country": "Germany"
13+
},
1014
"url": "https://www.wearedevelopers.com/world-congress"
1115
}

data/eddiejaoude/events/2023-09-18-talk-infobip.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@
1111
"end": "2023-09-19T18:00:00.000+00:00",
1212
"cfpClose": "2023-05-15T18:00:00.000+00:00"
1313
},
14+
"location": {
15+
"country": "Croatia"
16+
},
1417
"url": "https://shift.infobip.com"
1518
}

pages/docs/how-to-guides/events.mdx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@ All future events also appear on the Events page for the app.
2020

2121
_If you need help on how to edit this file, please see the <Link href="/docs/how-to-guides/editing">Editing Guide</Link>_
2222

23-
3. This `json` file will contain one object for the event and must have six fields, `isVirtual` and/or `isInPerson`, `color`, `name`, `description`, `date` and `url`, which will look like this:
23+
3. This `json` file will contain one object for the event and must have six fields, `isVirtual` and/or `isInPerson`, `color`, `name`, `description`, `date`, `url`, and `location`, which will look like this:
2424

2525
<ClipboardCopy>
2626
```js
2727
{
28-
"userStatus": "speaking",
29-
"speakerDetails": "Cloud Computing with Spring Cloud",
3028
"isVirtual": true,
3129
"isInPerson": true,
3230
"color": "red",
@@ -37,22 +35,30 @@ _If you need help on how to edit this file, please see the <Link href="/docs/how
3735
"end": "2022-12-09T17:00:00.000+00:00",
3836
"cfpClose": "2022-10-09T17:00:00.000+00:00"
3937
},
40-
"url": "https://www.youtube.com/watch?v=iqIFD02OkVE"
38+
"url": "https://www.youtube.com/watch?v=iqIFD02OkVE",
39+
"location": {
40+
"road": "Messe Berlin South Entrance & CityCube",
41+
"city": "Jafféstrasse",
42+
"state": "Berlin",
43+
"country": "Germany"
44+
}
4145
}
4246
```
4347
</ClipboardCopy>
4448

4549
| Property | Required | Description |
4650
| :--------------------- | :------- | :---------------------------------------------------------- |
47-
| userStatus | false | Is user `attending` or `speaking` |
48-
| speakerDetails | false | Topic of your talk at the event |
4951
| isVirtual / isInPerson | true | Is the event virtual or in person or both |
5052
| color | true | What color would you like this milestone to be displayed in |
5153
| name | true | Name of the event |
5254
| description | true | More details about the event, this can include markdown |
5355
| date | true | Start and end date plus time of the event |
5456
| cfpClose | false | The date of when the CFP to submit a talk closes |
5557
| url | true | Where can people learn more about the event |
58+
| road | false | In which road, the event is hosting |
59+
| city | false | In which city, the event is hosting |
60+
| state | false | In which state, the event is hosting |
61+
| country | false | In which country, the event is hosting |
5662

5763
4. Now you can commit your file and create a Pull Request. For more details please see <Link href="/docs/how-to-guides/editing">Editing Guide</Link>
5864

0 commit comments

Comments
 (0)