11import React from 'react'
2+ import Link from 'common/components/link'
23import { useAccountContext } from 'context/account-context'
34import { useCalendarStore } from 'store/calendar'
45import { Client } from '@notionhq/client'
@@ -18,6 +19,74 @@ const Argentina = (props: any) => {
1819
1920 console . log ( props . events )
2021
22+ const coreEvents = [
23+ {
24+ id : 'event-000' ,
25+ priority : 1 ,
26+ spanRows : 2 ,
27+ name : `Ethereum World's Fair & Coworking Space` ,
28+ description : 'Open coworking space for developers, builders, and researchers to collaborate throughout the week.' ,
29+ organizer : 'DevConnect' ,
30+ difficulty : 'All Welcome' ,
31+ amountPeople : '100' ,
32+ isCoreEvent : true ,
33+ timeblocks : [
34+ {
35+ start : '2025-11-17T09:00:00Z' ,
36+ end : '2025-11-22T18:00:00Z' ,
37+ } ,
38+ {
39+ start : '2025-11-20T09:00:00Z' ,
40+ end : '2025-11-20T18:00:00Z' ,
41+ } ,
42+ {
43+ start : '2025-11-22T09:00:00Z' ,
44+ end : '2025-11-22T18:00:00Z' ,
45+ } ,
46+ ] ,
47+ location : {
48+ url : 'https://example.com/coworking' ,
49+ text : 'Innovation Hub' ,
50+ } ,
51+ } ,
52+ {
53+ id : 'event-001' ,
54+ priority : 2 ,
55+ spanRows : 3 ,
56+ name : 'ETH Day' ,
57+ description : 'A beginner-friendly workshop covering blockchain fundamentals and use cases.' ,
58+ organizer : 'Ethereum Foundation' ,
59+ difficulty : 'All Welcome' ,
60+ isFairEvent : true ,
61+ amountPeople : '50' ,
62+ timeblocks : [
63+ {
64+ start : '2025-11-17T10:00:00Z' ,
65+ end : '2025-11-17T12:00:00Z' ,
66+ } ,
67+ ] ,
68+ location : {
69+ url : 'https://example.com/venue1' ,
70+ text : 'Main Conference Hall' ,
71+ } ,
72+ // timeblocks: [
73+ // {
74+ // start: '2025-11-17T10:00:00Z',
75+ // end: '2025-11-17T12:00:00Z',
76+ // },
77+ // ],
78+ // priority: 1,
79+ // categories: ['Education', 'Blockchain', 'Workshop'],
80+ } ,
81+ ]
82+
83+ const events = [ ...props . events , ...coreEvents ] . map ( event => {
84+ return {
85+ ...event ,
86+ onClick : ( ) => { } ,
87+ }
88+ } )
89+
2190 return (
2291 < >
2392 < Header active />
@@ -43,12 +112,38 @@ const Argentina = (props: any) => {
43112 < div className = "flex flex-col gap-4 text-black" >
44113 < div className = "section my-1 mb-8" >
45114 < NewSchedule
46- events = { props . events }
115+ events = { events }
47116 selectedEvent = { selectedEvent }
48117 selectedDay = { selectedDay }
49118 setSelectedEvent = { setSelectedEvent }
50119 setSelectedDay = { setSelectedDay }
51120 />
121+
122+ < div className = "text-sm flex flex-col gap-4" >
123+ < p >
124+ < strong > Disclaimer:</ strong > This calendar is a work in progress and may change a lot before Devconnect
125+ week. Please check back regularly for updates.
126+ </ p >
127+ < div >
128+ < p >
129+ < strong > Want to be featured on our calendar?</ strong > We encourage event hosts to submit their events to
130+ atprotocol adhering to the [devcon.org event record type].{ ' ' }
131+ < strong > This is not a guarantee of inclusion as we still curate events,</ strong > but is a{ ' ' }
132+ < strong > requirement</ strong > for community events to be considered on our calendar.
133+ </ p >
134+ < p >
135+ < strong > How do I submit my event to atprotocol?</ strong > ...
136+ </ p >
137+ </ div >
138+ < p >
139+ < strong > Want to build a community calendar? </ strong > For your convenience, we collect all events
140+ submitted to atprotocol and expose them via{ ' ' }
141+ < Link indicateExternal className = "bold" href = "https://at-slurper.onrender.com/all-events" >
142+ https://at-slurper.onrender.com/all-events
143+ </ Link >
144+ . You can also use atprotocol directly, as all data is public.
145+ </ p >
146+ </ div >
52147 </ div >
53148 </ div >
54149 < Footer />
@@ -70,32 +165,32 @@ export async function getStaticProps({ locale }: { locale: string }) {
70165
71166 const query = {
72167 database_id : '1f5638cdc41580be9117f4963f021d8b' ,
73- // sorts: [
74- // {
75- // property: '[HOST] Event Date ',
76- // direction: 'ascending',
77- // },
78- // {
79- // property: '[WEB] Priority (sort)',
80- // direction: 'descending',
81- // },
82- // ],
83- // filter: {
84- // and: [
85- // {
86- // property: '[HOST] Event Date ',
87- // date: {
88- // is_not_empty: true,
89- // },
90- // },
91- // {
92- // property: '[WEB] Live',
93- // checkbox: {
94- // equals: true,
95- // },
96- // },
97- // ],
98- // },
168+ sorts : [
169+ {
170+ property : 'Event date ' ,
171+ direction : 'ascending' ,
172+ } ,
173+ // {
174+ // property: '[WEB] Priority (sort)',
175+ // direction: 'descending',
176+ // },
177+ ] ,
178+ filter : {
179+ and : [
180+ {
181+ property : 'Event date ' ,
182+ date : {
183+ is_not_empty : true ,
184+ } ,
185+ } ,
186+ {
187+ property : 'Live on website ' ,
188+ checkbox : {
189+ equals : true ,
190+ } ,
191+ } ,
192+ ] ,
193+ } ,
99194 }
100195
101196 const notionEvents = await notion . databases . query ( query as any )
@@ -132,34 +227,39 @@ export interface Event {
132227
133228 // console.log(notionEvents)
134229
135- const events = notionEvents . results
136- . map ( event => {
137- const formattedEvent = formatResult ( event )
138-
139- const startDate = moment ( '2025-11-17T09:00:00Z' ) . add ( Math . floor ( Math . random ( ) * 6 ) , 'days' )
140-
141- return {
142- id : event . id ,
143- name : formattedEvent [ 'Event name' ] ,
144- description : formattedEvent [ 'Description' ] || '' ,
145- capacity : formattedEvent [ 'Capacity' ] ,
146- size : formattedEvent [ 'Size' ] ,
147- location : formattedEvent [ 'Location' ] || { text : 'TBD' , url : '' } ,
148- timeblocks : [
149- {
150- start : startDate . format ( 'YYYY-MM-DDTHH:mm:ss[Z]' ) ,
151- end : startDate . clone ( ) . add ( 4 , 'hours' ) . format ( 'YYYY-MM-DDTHH:mm:ss[Z]' ) ,
152- } ,
153- ] ,
154- difficulty : 'Beginner' ,
230+ const events = notionEvents . results . map ( event => {
231+ const formattedEvent = formatResult ( event )
232+
233+ const timeblocks = [ ]
234+
235+ if ( formattedEvent [ 'Event date' ] ) {
236+ let startDate = moment . utc ( formattedEvent [ 'Event date' ] . startDate )
237+ let endDate
238+
239+ if ( formattedEvent [ 'Event date' ] . endDate ) {
240+ endDate = moment . utc ( formattedEvent [ 'Event date' ] . endDate ) . format ( 'YYYY-MM-DDTHH:mm:ss[Z]' )
241+ } else {
242+ endDate = startDate . format ( 'YYYY-MM-DDTHH:mm:ss[Z]' )
155243 }
156- } )
157- . sort ( ( a , b ) => moment ( a . timeblocks [ 0 ] . start ) . valueOf ( ) - moment ( b . timeblocks [ 0 ] . start ) . valueOf ( ) )
158244
159- // @ts -ignore
160- events [ 0 ] . isFairEvent = true
161- // @ts -ignore
162- events [ 1 ] . isCoreEvent = true
245+ timeblocks . push ( {
246+ start : startDate . format ( 'YYYY-MM-DDTHH:mm:ss[Z]' ) ,
247+ end : endDate ,
248+ } )
249+ }
250+
251+ return {
252+ id : event . id ,
253+ name : formattedEvent [ 'Event name' ] ,
254+ description : formattedEvent [ 'Description' ] || '' ,
255+ capacity : formattedEvent [ 'Capacity' ] ,
256+ startDate : formattedEvent [ 'Event date' ] ,
257+ // size: formattedEvent['Size'],
258+ location : formattedEvent [ 'Location' ] || { text : 'TBD' , url : '' } ,
259+ timeblocks : timeblocks ,
260+ difficulty : 'Beginner' ,
261+ }
262+ } )
163263
164264 return {
165265 props : {
0 commit comments