Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions src/app/(home)/upcoming/more-info/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
import { formatInTimeZone } from 'date-fns-tz';
import { CalendarDays, Clock, Info, MapPin, Tag, User } from 'lucide-react';
import type { Metadata, ResolvingMetadata } from 'next';
import Image from 'next/image';
import Link from 'next/link';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { formatInTimeZone } from "date-fns-tz";
import { CalendarDays, Clock, Info, MapPin, Tag, User } from "lucide-react";
import type { Metadata, ResolvingMetadata } from "next";
import Image from "next/image";
import Link from "next/link";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
Comment on lines +1 to +7
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file switches many literals/imports to double quotes, but the repo’s Biome config enforces single quotes (javascript.formatter.quoteStyle: single). Please run the formatter or revert to single quotes to keep consistent styling and avoid churn.

Copilot uses AI. Check for mistakes.
import {
Card,
CardContent,
CardFooter,
CardHeader,
CardTitle,
} from '@/components/ui/card';
import { CustomMDX } from '@/mdx-components';
import { createClient } from '@/utils/supabase/server';
import type { eventsInsertType } from '../../../../../../schema.zod';
} from "@/components/ui/card";
import { CustomMDX } from "@/mdx-components";
import { createClient } from "@/utils/supabase/server";
import type { eventsInsertType } from "../../../../../../schema.zod";

// import { enGB } from 'date-fns/locale/';

async function getEventsBySlug({ slug }: { slug: string }) {
const supabase = await createClient();

const { data: events, error } = await supabase
.from('events')
.select('*')
.eq('slug', slug)
.from("events")
.select("*")
.eq("slug", slug)
.single();

if (error || !events) {
console.error('Error fetching events:', error);
console.error("Error fetching events:", error);
return null;
}

Expand All @@ -38,23 +38,23 @@ type Params = Promise<{ slug: string }>;

export async function generateMetadata(
{ params }: { params: Params },
parent: ResolvingMetadata
parent: ResolvingMetadata,
): Promise<Metadata> {
const event = await getEventsBySlug({ slug: (await params).slug });

const previousImages = (await parent).openGraph?.images || [];

if (!event) {
return {
title: 'Event Not Found - Upcoming Events | Founders',
description: 'Check out our latest events and workshops',
title: "Event Not Found - Upcoming Events | Founders",
description: "Check out our latest events and workshops",
};
}

const eventDate = new Date(event.start_date).toLocaleDateString('en-US', {
month: 'long',
day: 'numeric',
year: 'numeric',
const eventDate = new Date(event.start_date).toLocaleDateString("en-US", {
month: "long",
day: "numeric",
year: "numeric",
});

return {
Expand All @@ -63,18 +63,18 @@ export async function generateMetadata(
openGraph: {
title: event.title,
description: event.description,
type: 'website',
type: "website",
images: [event.banner_image, ...previousImages],
},
twitter: {
card: 'summary_large_image',
card: "summary_large_image",
title: event.title,
description: event.description,
images: [event.banner_image],
},
other: {
'event:type': event.event_type || 'Online',
'event:date': eventDate,
"event:type": event.event_type || "Online",
"event:date": eventDate,
},
};
}
Expand Down Expand Up @@ -134,7 +134,7 @@ export default async function EventRegistrationSection({
variant="outline"
className="w-full sm:w-auto"
>
<Link href={event.more_info || '#'}>
<Link href={event.more_info || "#"}>
{event.more_info_text}
</Link>
</Button>
Expand All @@ -143,7 +143,7 @@ export default async function EventRegistrationSection({
</div>
<div className="mx-auto max-w-screen-xl rounded-lg bg-muted">
<Image
src={event.banner_image || '/placeholder.svg'}
src={event.banner_image || "/placeholder.svg"}
alt={event.title}
width={1200}
height={600}
Expand All @@ -164,12 +164,12 @@ export default async function EventRegistrationSection({
<div className="flex items-center gap-4">
<Image
src="/FC-logo1.png"
alt="Founder's Club"
alt="Founders Club"
width={48}
height={48}
className="rounded-full"
/>
<span>Founder&apos;s Club</span>
<span>Founders Club</span>
</div>
}
/>
Expand All @@ -178,16 +178,16 @@ export default async function EventRegistrationSection({
title="Starting on"
content={formatInTimeZone(
new Date(event.start_date),
'Asia/Kolkata',
'dd MMMM yyyy, hh:mm a zzz'
"Asia/Kolkata",
"dd MMMM yyyy, hh:mm a zzz",
)}
/>
<EventDetailCard
icon={<Tag className="h-5 w-5" />}
title="Tags"
content={
<div className="flex flex-wrap gap-2">
{event.tags.map(tag => (
{event.tags.map((tag) => (
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

event.tags.map((tag) => ...) adds parentheses for a single-parameter arrow function, which conflicts with the repo’s arrowParentheses: asNeeded setting. Prefer tag => ... here.

Suggested change
{event.tags.map((tag) => (
{event.tags.map(tag => (

Copilot uses AI. Check for mistakes.
<Badge key={tag} variant="default">
{tag}
</Badge>
Expand All @@ -198,15 +198,15 @@ export default async function EventRegistrationSection({
<EventDetailCard
icon={<MapPin className="h-5 w-5" />}
title="Venue"
content={event.venue || 'To be announced'}
content={event.venue || "To be announced"}
/>
<EventDetailCard
icon={<Clock className="h-5 w-5" />}
title="End Date"
content={formatInTimeZone(
new Date(event.end_date),
'Asia/Kolkata',
'dd MMMM yyyy, hh:mm a zzz'
"Asia/Kolkata",
"dd MMMM yyyy, hh:mm a zzz",
)}
/>
<EventDetailCard
Expand All @@ -226,7 +226,7 @@ export default async function EventRegistrationSection({
suppressHydrationWarning
>
{/* TipTap outputs Markdown, render with MDX */}
<CustomMDX source={event.rules || ''} />
<CustomMDX source={event.rules || ""} />
</CardContent>
<CardFooter>
<div className="flex flex-col sm:flex-row w-full justify-center space-y-4 sm:space-y-0 sm:space-x-6 mb-6 md:mb-10">
Expand Down Expand Up @@ -260,7 +260,7 @@ export default async function EventRegistrationSection({
variant="outline"
className="w-full sm:w-auto"
>
<Link href={event.more_info || '#'}>
<Link href={event.more_info || "#"}>
{event.more_info_text}
</Link>
</Button>
Expand Down
38 changes: 18 additions & 20 deletions src/components/upcoming-featured.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { formatInTimeZone } from 'date-fns-tz';
import { ArrowUpRight, CalendarX2 } from 'lucide-react';
import Image from 'next/image';
import Link from 'next/link';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { formatInTimeZone } from "date-fns-tz";
import { ArrowUpRight, CalendarX2 } from "lucide-react";
import Image from "next/image";
import Link from "next/link";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
Comment on lines +1 to +6
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file now uses double-quoted string literals, but the repo’s Biome config sets javascript.formatter.quoteStyle to single. Please revert these to single quotes (or run the Biome formatter) to avoid style drift/noisy diffs.

Copilot uses AI. Check for mistakes.
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from '@/components/ui/card';
import type { eventsInsertType } from '../../schema.zod';
import { GetBlurImage } from './blur-image';
} from "@/components/ui/card";
import type { eventsInsertType } from "../../schema.zod";
import { GetBlurImage } from "./blur-image";

export function FeaturedPost({ event }: { event: eventsInsertType }) {
// If there's no event OR the event has ended, show a friendly empty state
Expand Down Expand Up @@ -47,7 +47,7 @@ export function FeaturedPost({ event }: { event: eventsInsertType }) {
</div>
);
}
const tags = event.tags.map(tag => (
const tags = event.tags.map((tag) => (
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

event.tags.map((tag) => ...) adds parentheses around a single-arg arrow function; Biome is configured with arrowParentheses: asNeeded, so this should be tag => ... to match the repo formatter.

Suggested change
const tags = event.tags.map((tag) => (
const tags = event.tags.map(tag => (

Copilot uses AI. Check for mistakes.
<Badge key={tag} variant="default">
{tag}
</Badge>
Expand Down Expand Up @@ -95,14 +95,12 @@ export function FeaturedPost({ event }: { event: eventsInsertType }) {
<div className="flex flex-1 items-center gap-3">
<Image
src="/FC-logo1.png"
alt="Founder's Club"
alt="Founders Club"
width={40}
height={40}
className="rounded-full"
/>
<span className="text-xs font-medium">
Founder&apos;s Club
</span>
<span className="text-xs font-medium">Founders Club</span>
</div>
</div>
<div className="flex flex-col">
Expand All @@ -111,8 +109,8 @@ export function FeaturedPost({ event }: { event: eventsInsertType }) {
<span className="text-sm font-medium">
{formatInTimeZone(
new Date(event.start_date),
'Asia/Kolkata',
'dd MMMM yyyy'
"Asia/Kolkata",
"dd MMMM yyyy",
)}
</span>
</div>
Expand All @@ -129,10 +127,10 @@ export function FeaturedPost({ event }: { event: eventsInsertType }) {
<div className="flex flex-col gap-px">
<span className="text-xs font-medium">Founder&apos;s Club</span>
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section still renders the label as "Founder’s Club" while other updated strings in this component use "Founders Club". Update this remaining UI string so the branding is consistent across breakpoints.

Suggested change
<span className="text-xs font-medium">Founder&apos;s Club</span>
<span className="text-xs font-medium">Founders Club</span>

Copilot uses AI. Check for mistakes.
<span className="text-xs text-muted-foreground">
{new Date(event.start_date).toLocaleDateString('en-IN', {
day: '2-digit',
month: 'long',
year: 'numeric',
{new Date(event.start_date).toLocaleDateString("en-IN", {
day: "2-digit",
month: "long",
year: "numeric",
})}
</span>
</div>
Expand Down
6 changes: 3 additions & 3 deletions supabase/functions/contact-function/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Deno.serve(async req => {

// Send email using Resend
const senderEmailData = {
from: "The Founder's Club <no-reply@thefoundersclub.tech>",
from: "The Founders Club <no-reply@thefoundersclub.tech>",
to: [record.email],
subject: 'Your Contact Request has been Submitted',
html: generateHTML(record),
Comment on lines 32 to 36
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The from value uses double quotes, while the rest of the file uses single quotes. Please change to single quotes to keep formatting consistent and avoid formatter churn.

Copilot uses AI. Check for mistakes.
Expand All @@ -44,10 +44,10 @@ Deno.serve(async req => {
);

const supportEmailData = {
from: "The Founder's Club <no-reply@thefoundersclub.tech>",
from: "The Founders Club <no-reply@thefoundersclub.tech>",
to: ['support@thefoundersclub.in'],
Comment on lines 46 to 48
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The from value here also uses double quotes in an otherwise single-quote file; please switch to single quotes to match repo formatting.

Copilot uses AI. Check for mistakes.
subject: 'New Contact Request has been Submitted',
html: `Name: ${record.name}<br/>Email: ${record.email}<br/>Phone: ${record.phone}<br/>Subject: <strong>${record.subject}</strong><br/>Description: ${record.description}<br/><br/>The Founder's Club<br/>Directorate of Entrepeunership and Innovation<br/>SRM Institute of Science and Technology<br/>Kattankulathur<br/>Tamil Nadu - 603203
html: `Name: ${record.name}<br/>Email: ${record.email}<br/>Phone: ${record.phone}<br/>Subject: <strong>${record.subject}</strong><br/>Description: ${record.description}<br/><br/>The Founders Club<br/>Directorate of Entrepeunership and Innovation<br/>SRM Institute of Science and Technology<br/>Kattankulathur<br/>Tamil Nadu - 603203
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Email signature contains a misspelling: "Entrepeunership" should be "Entrepreneurship". Since this content is user-facing, please correct it.

Suggested change
html: `Name: ${record.name}<br/>Email: ${record.email}<br/>Phone: ${record.phone}<br/>Subject: <strong>${record.subject}</strong><br/>Description: ${record.description}<br/><br/>The Founders Club<br/>Directorate of Entrepeunership and Innovation<br/>SRM Institute of Science and Technology<br/>Kattankulathur<br/>Tamil Nadu - 603203
html: `Name: ${record.name}<br/>Email: ${record.email}<br/>Phone: ${record.phone}<br/>Subject: <strong>${record.subject}</strong><br/>Description: ${record.description}<br/><br/>The Founders Club<br/>Directorate of Entrepreneurship and Innovation<br/>SRM Institute of Science and Technology<br/>Kattankulathur<br/>Tamil Nadu - 603203

Copilot uses AI. Check for mistakes.
`,
};
console.log(
Expand Down
2 changes: 1 addition & 1 deletion supabase/functions/contact-function/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export const generateHTML = (record: SupabaseRecord) => {
<tr>
<td class="pad" style="padding-left:38px;padding-right:38px;padding-top:10px;">
<div style="color:#000000;font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;line-height:150%;;mso-line-height-alt:24px;">
<p style="margin: 0;"><span style="word-break: break-word; color: #4b4949;">Hello ${record.name},</span><br><br><span style="word-break: break-word; color: #4b4949;">Thank you for reaching out to the Founder's Club! We have successfully received your contact request and will be shortly reaching out to you.<br/><br/>The Founder's Club<br/>Directorate of Entrepeunership and Innovation<br/>SRM Institute of Science and Technology<br/>Kattankulathur<br/>Tamil Nadu - 603203</span></p>
<p style="margin: 0;"><span style="word-break: break-word; color: #4b4949;">Hello ${record.name},</span><br><br><span style="word-break: break-word; color: #4b4949;">Thank you for reaching out to the Founders Club! We have successfully received your contact request and will be shortly reaching out to you.<br/><br/>The Founders Club<br/>Directorate of Entrepeunership and Innovation<br/>SRM Institute of Science and Technology<br/>Kattankulathur<br/>Tamil Nadu - 603203</span></p>
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Email template text contains a misspelling: "Entrepeunership" should be "Entrepreneurship" (user-facing email content).

Suggested change
<p style="margin: 0;"><span style="word-break: break-word; color: #4b4949;">Hello ${record.name},</span><br><br><span style="word-break: break-word; color: #4b4949;">Thank you for reaching out to the Founders Club! We have successfully received your contact request and will be shortly reaching out to you.<br/><br/>The Founders Club<br/>Directorate of Entrepeunership and Innovation<br/>SRM Institute of Science and Technology<br/>Kattankulathur<br/>Tamil Nadu - 603203</span></p>
<p style="margin: 0;"><span style="word-break: break-word; color: #4b4949;">Hello ${record.name},</span><br><br><span style="word-break: break-word; color: #4b4949;">Thank you for reaching out to the Founders Club! We have successfully received your contact request and will be shortly reaching out to you.<br/><br/>The Founders Club<br/>Directorate of Entrepreneurship and Innovation<br/>SRM Institute of Science and Technology<br/>Kattankulathur<br/>Tamil Nadu - 603203</span></p>

Copilot uses AI. Check for mistakes.
</div>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion supabase/functions/event-rejection-email/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Deno.serve(async req => {
}
// Send confirmation email to registrant
const registrantEmailData = {
from: "The Founder's Club <no-reply@thefoundersclub.tech>",
from: "The Founders Club <no-reply@thefoundersclub.tech>",
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The from field is the only string here using double quotes in a file otherwise consistently using single quotes. For consistency (and to match the Biome quoteStyle setting), switch this to single quotes.

Suggested change
from: "The Founders Club <no-reply@thefoundersclub.tech>",
from: 'The Founders Club <no-reply@thefoundersclub.tech>',

Copilot uses AI. Check for mistakes.
to: [record.registration_email],
subject: 'Your Event Registration Confirmation',
html: generateHTML(record),
Comment on lines 63 to 68
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function only sends when is_approved === 'REJECTED', but the inline comment and email subject still say “confirmation”. That’s likely to confuse recipients and doesn’t match the rejection template content; update the subject (and comment) to indicate rejection.

Copilot uses AI. Check for mistakes.
Expand Down