Skip to content

Commit 5452fb6

Browse files
committed
Update Google Calendar link in Manifesto component and remove dynamic URL generation functions
1 parent 0b8d83f commit 5452fb6

1 file changed

Lines changed: 1 addition & 36 deletions

File tree

src/components/Manifesto.astro

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ import { getTranslation } from "@/i18n";
6363
<span class="lang-en">{getTranslation("en", "meeting.addToCalendar")}</span>
6464
</div>
6565
<a
66-
id="google-calendar-link"
67-
href="#"
66+
href="https://calendar.google.com/calendar/embed?src=saacchq%40gmail.com&ctz=Asia%2FRiyadh"
6867
target="_blank"
6968
rel="noreferrer"
7069
class="flex items-center gap-3 px-4 py-3 text-xs text-[#e6edf3] hover:bg-[#3fb950]/10 hover:text-[#3fb950] transition-colors"
@@ -87,40 +86,6 @@ import { getTranslation } from "@/i18n";
8786
</section>
8887

8988
<script>
90-
function getNextFriday(): Date {
91-
const now = new Date();
92-
const dayOfWeek = now.getUTCDay();
93-
const daysUntilFriday = (5 - dayOfWeek + 7) % 7 || 7;
94-
const nextFriday = new Date(now);
95-
nextFriday.setUTCDate(now.getUTCDate() + daysUntilFriday);
96-
nextFriday.setUTCHours(17, 30, 0, 0);
97-
return nextFriday;
98-
}
99-
100-
function formatGCalDate(date: Date): string {
101-
return date.toISOString().replace(/[-:]/g, "").replace(/\.\d{3}/, "");
102-
}
103-
104-
function buildGoogleCalendarUrl(): string {
105-
const start = getNextFriday();
106-
const end = new Date(start.getTime() + 60 * 60 * 1000);
107-
const params = new URLSearchParams({
108-
action: "TEMPLATE",
109-
text: "sa/acc Community Meeting",
110-
dates: `${formatGCalDate(start)}/${formatGCalDate(end)}`,
111-
details: "Weekly sa/acc (Saudi Acceleration) community meeting.\nJoin via Discord: https://discord.gg/Ks4Dpdzkmn",
112-
location: "https://discord.gg/Ks4Dpdzkmn",
113-
recur: "RRULE:FREQ=WEEKLY;BYDAY=FR",
114-
ctz: "Asia/Riyadh",
115-
});
116-
return `https://calendar.google.com/calendar/render?${params.toString()}`;
117-
}
118-
119-
const googleLink = document.getElementById("google-calendar-link") as HTMLAnchorElement;
120-
if (googleLink) {
121-
googleLink.href = buildGoogleCalendarUrl();
122-
}
123-
12489
const badge = document.getElementById("calendar-badge");
12590
const dropdown = document.getElementById("calendar-dropdown");
12691
const wrapper = document.getElementById("calendar-dropdown-wrapper");

0 commit comments

Comments
 (0)