Skip to content

Commit bb99d76

Browse files
committed
add socials to calendar
1 parent ffaf55d commit bb99d76

5 files changed

Lines changed: 59 additions & 13 deletions

File tree

lib/assets/icons/instagram.svg

Lines changed: 1 addition & 0 deletions
Loading

lib/assets/icons/x.svg

Lines changed: 3 additions & 0 deletions
Loading

lib/components/event-schedule-new/atproto-to-calendar-format.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ export const atprotoToCalendarFormat = (event: any) => {
5858

5959
const manualOverrides = {} as any;
6060

61+
if (event.id === 29) {
62+
// 29 = ETH DAY
63+
// 23 = COWORKING
64+
// manualOverrides.spanRows = 5;
65+
console.log(event, "event");
66+
console.log("manual override for coworking");
67+
// event.spanRows = 3;
68+
}
69+
70+
const socials = event.socials || {};
71+
6172
return {
6273
id: event.id,
6374
name: event.title,
@@ -72,6 +83,9 @@ export const atprotoToCalendarFormat = (event: any) => {
7283
imageUrl: event.image_url || "",
7384
showTimeOfDay: event.showTimeOfDay,
7485
ticketsAvailable: event.requires_ticket || false,
86+
xHandle: socials.x_url || "",
87+
instagramHandle: socials.instagram_url || "",
88+
farcasterHandle: socials.farcaster_url || "",
7589
...manualOverrides,
7690
};
7791
};

lib/components/event-schedule-new/event/event.tsx

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ import ZupassConnection from "../zupass/zupass";
2121
import { eventShops } from "../zupass/event-shops-list";
2222
import VoxelButton from "lib/components/voxel-button/button";
2323
import { convert } from "html-to-text";
24+
import XIcon from "lib/assets/icons/x.svg";
25+
import FarcasterIcon from "lib/assets/icons/farcaster.svg";
26+
import InstagramIcon from "lib/assets/icons/instagram.svg";
2427
import { TicketTag } from "../calendar.components";
2528

2629
type EventProps = {
@@ -253,19 +256,41 @@ const Event: React.FC<EventProps> = ({
253256

254257
<div className="text-sm">{convert(event.description)}</div>
255258

256-
{event.eventLink !== "https://devconnect.org/calendar" && (
257-
<Link href={event.eventLink} className="self-start">
258-
<VoxelButton
259-
color="blue-1"
260-
size="sm"
261-
fill
262-
className="shrink-0 mt-2 self-start"
263-
>
264-
Visit Site
265-
<ArrowUpRight className="w-4 h-4 mb-0.5" />
266-
</VoxelButton>
267-
</Link>
268-
)}
259+
<div className="flex justify-between items-center gap-2">
260+
{event.eventLink !== "https://devconnect.org/calendar" && (
261+
<Link href={event.eventLink} className="self-start">
262+
<VoxelButton
263+
color="blue-1"
264+
size="sm"
265+
fill
266+
className="shrink-0 mt-2 self-start"
267+
>
268+
Visit Site
269+
<ArrowUpRight className="w-4 h-4 mb-0.5" />
270+
</VoxelButton>
271+
</Link>
272+
)}
273+
274+
<div className="flex gap-1 text-xl mt-2 mr-1">
275+
{event.xHandle && (
276+
<Link href={`${event.xHandle}`} className="p-1">
277+
<XIcon className="icon self-end" />
278+
</Link>
279+
)}
280+
281+
{event.instagramHandle && (
282+
<Link href={`${event.instagramHandle}`} className="p-1">
283+
<InstagramIcon className="icon self-end" />
284+
</Link>
285+
)}
286+
287+
{event.farcasterHandle && (
288+
<Link href={`${event.farcasterHandle}`} className="p-1">
289+
<FarcasterIcon className="icon self-end" />
290+
</Link>
291+
)}
292+
</div>
293+
</div>
269294

270295
<Separator className="my-3" />
271296

lib/components/event-schedule-new/model.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ export interface Event {
3232
imageUrl?: string;
3333
showTimeOfDay?: boolean;
3434
ticketsAvailable?: boolean;
35+
xHandle?: string;
36+
instagramHandle?: string;
37+
farcasterHandle?: string;
3538
}

0 commit comments

Comments
 (0)