From 0d2e79963921154bfe28e9e8d802c00f017f6082 Mon Sep 17 00:00:00 2001 From: Neil Parikh Date: Sun, 12 Sep 2021 00:13:40 -0400 Subject: [PATCH 01/10] test --- components/EventDescriptionCard.tsx | 4 +++- content/events/2021/fall/BOT.md | 1 + types.d.ts | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/EventDescriptionCard.tsx b/components/EventDescriptionCard.tsx index 86c9b3db..deb6a558 100644 --- a/components/EventDescriptionCard.tsx +++ b/components/EventDescriptionCard.tsx @@ -15,6 +15,7 @@ interface Props { date: Date; poster?: string; registerLink?: string; + permaLink?: string; } /** @@ -35,6 +36,7 @@ export function EventDescriptionCard({ date, online, registerLink, + permaLink, }: Props) { const Icon = getIcon(location); @@ -43,7 +45,7 @@ export function EventDescriptionCard({ {poster && {name}}
-

{name}

+

{permaLink ? name : name}

diff --git a/content/events/2021/fall/BOT.md b/content/events/2021/fall/BOT.md index 469b0d4f..67a142cc 100644 --- a/content/events/2021/fall/BOT.md +++ b/content/events/2021/fall/BOT.md @@ -6,6 +6,7 @@ online: true location: 'Twitch' poster: 'images/events/2021/fall/BOT.png' registerLink: https://bit.ly/csc-bot-event-signup-form +permaLink: /events/2021/fall/BOT/ --- Kick off the fall term with CS Club’s BOT event! 🍂 Interested in attending upcoming CSC events? Want to meet others in the CS community? diff --git a/types.d.ts b/types.d.ts index 9868d525..4a905069 100644 --- a/types.d.ts +++ b/types.d.ts @@ -12,6 +12,7 @@ declare module "*.event.mdx" { location: string; poster?: string; registerLink?: string; + permaLink?: string; } const ReactComponent: ComponentType; -- 2.39.2 From 2570745789a070a1c62be5fc4e6b9fdab5fd56e1 Mon Sep 17 00:00:00 2001 From: Neil Parikh Date: Sun, 12 Sep 2021 00:16:00 -0400 Subject: [PATCH 02/10] fix --- components/EventDescriptionCard.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/components/EventDescriptionCard.tsx b/components/EventDescriptionCard.tsx index deb6a558..16f9e3b5 100644 --- a/components/EventDescriptionCard.tsx +++ b/components/EventDescriptionCard.tsx @@ -4,6 +4,7 @@ import { Button } from "./Button"; import { EventSetting } from "./EventSetting"; import { Image } from "./Image"; import { Discord, Twitch, Instagram, Facebook } from "./SocialLinks"; +import { Link } from "./Link"; import styles from "./EventDescriptionCard.module.css"; -- 2.39.2 From 1695ec2fb46f730c57fa2decd4a18b84234917ea Mon Sep 17 00:00:00 2001 From: Neil Parikh Date: Sun, 12 Sep 2021 00:24:29 -0400 Subject: [PATCH 03/10] lint --- components/EventDescriptionCard.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/EventDescriptionCard.tsx b/components/EventDescriptionCard.tsx index 16f9e3b5..89e76ed0 100644 --- a/components/EventDescriptionCard.tsx +++ b/components/EventDescriptionCard.tsx @@ -3,8 +3,8 @@ import React from "react"; import { Button } from "./Button"; import { EventSetting } from "./EventSetting"; import { Image } from "./Image"; -import { Discord, Twitch, Instagram, Facebook } from "./SocialLinks"; import { Link } from "./Link"; +import { Discord, Twitch, Instagram, Facebook } from "./SocialLinks"; import styles from "./EventDescriptionCard.module.css"; @@ -46,7 +46,9 @@ export function EventDescriptionCard({ {poster && {name}}
-

{permaLink ? name : name}

+

+ {permaLink ? name : name} +

-- 2.39.2 From f58a6407f28f1b299879bee2fadd7f908fdb5784 Mon Sep 17 00:00:00 2001 From: Neil Parikh Date: Sun, 12 Sep 2021 00:36:16 -0400 Subject: [PATCH 04/10] use name prop, not literal --- components/EventDescriptionCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/EventDescriptionCard.tsx b/components/EventDescriptionCard.tsx index 89e76ed0..2a902b5e 100644 --- a/components/EventDescriptionCard.tsx +++ b/components/EventDescriptionCard.tsx @@ -47,7 +47,7 @@ export function EventDescriptionCard({

- {permaLink ? name : name} + {permaLink ? {name} : name}

-- 2.39.2 From 097669994a34173d6ebd0355aae72b94d06fdf50 Mon Sep 17 00:00:00 2001 From: Neil Parikh Date: Sun, 12 Sep 2021 01:01:49 -0400 Subject: [PATCH 05/10] move permalink --- components/EventDescriptionCard.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/EventDescriptionCard.tsx b/components/EventDescriptionCard.tsx index 2a902b5e..e659f89b 100644 --- a/components/EventDescriptionCard.tsx +++ b/components/EventDescriptionCard.tsx @@ -46,15 +46,14 @@ export function EventDescriptionCard({ {poster && {name}}
-

- {permaLink ? {name} : name} -

+

{name}

{short}

+ {permaLink && More details} {registerLink && (

{short}

+ {permaLink && More details}