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
6 changes: 0 additions & 6 deletions apps/blade/src/app/admin/club/check-in/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";

import { auth } from "@forge/auth";
Expand All @@ -7,11 +6,6 @@ import { SIGN_IN_PATH } from "~/consts";
import { api, HydrateClient } from "~/trpc/server";
import { CheckInPage } from "./_components/check-in-page";

export const metadata: Metadata = {
title: "Blade | Hackathon Check-in",
description: "Check-in hackers and members for hackathon events.",
};

export default async function HackathonCheckIn() {
// Check if the user is authenticated
const session = await auth();
Expand Down
6 changes: 0 additions & 6 deletions apps/blade/src/app/admin/club/data/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";

import { auth } from "@forge/auth";
Expand All @@ -9,11 +8,6 @@ import { api, HydrateClient } from "~/trpc/server";
import EventDemographics from "./_components/EventDemographics";
import MemberDemographics from "./_components/MemberDemographics";

export const metadata: Metadata = {
title: "Blade | Data",
description: "View member and event demographics.",
};

export default async function Data() {
// authentication
const session = await auth();
Expand Down
6 changes: 0 additions & 6 deletions apps/blade/src/app/admin/club/events/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";

import { auth } from "@forge/auth";
Expand All @@ -9,11 +8,6 @@ import { AddPoints } from "../../_components/AddPoints";
import ScannerPopUp from "../members/_components/scanner";
import { EventsTable } from "./_components/events-table";

export const metadata: Metadata = {
title: "Club Events",
description: "Manage Knight Hacks club events.",
};

export default async function Events() {
const session = await auth();
if (!session) {
Expand Down
6 changes: 0 additions & 6 deletions apps/blade/src/app/admin/club/members/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";

import { auth } from "@forge/auth";
Expand All @@ -8,11 +7,6 @@ import { api, HydrateClient } from "~/trpc/server";
import MemberTable from "./_components/members-table";
import ScannerPopUp from "./_components/scanner";

export const metadata: Metadata = {
title: "Blade | Members",
description: "Manage Knight Hacks members.",
};

export default async function Members() {
// authentication
const session = await auth();
Expand Down
6 changes: 0 additions & 6 deletions apps/blade/src/app/admin/forms/[slug]/responses/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Metadata } from "next";
import Link from "next/link";
import { redirect } from "next/navigation";
import { ArrowLeft } from "lucide-react";
Expand All @@ -13,11 +12,6 @@ import { api, HydrateClient } from "~/trpc/server";
import { AllResponsesView } from "./_components/AllResponsesView";
import { PerUserResponsesView } from "./_components/PerUserResponsesView";

export const metadata: Metadata = {
title: "Blade | Form Responses",
description: "View Form Responses",
};

export default async function FormResponsesPage({
params,
}: {
Expand Down
4 changes: 0 additions & 4 deletions apps/blade/src/app/admin/forms/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ import { SIGN_IN_PATH } from "~/consts";
import { api } from "~/trpc/server";
import FormsClient from "../../_components/admin/forms/homepage";

export const metadata = {
title: "Forms",
};

export default async function Page() {
const session = await auth();
if (!session) {
Expand Down
6 changes: 0 additions & 6 deletions apps/blade/src/app/admin/hackathon/check-in/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";

import { auth } from "@forge/auth";
Expand All @@ -7,11 +6,6 @@ import { SIGN_IN_PATH } from "~/consts";
import { api, HydrateClient } from "~/trpc/server";
import { CheckInPage } from "./_components/check-in-page";

export const metadata: Metadata = {
title: "Blade | Hackathon Check-in",
description: "Check-in hackers and members for hackathon events.",
};

export default async function HackathonCheckIn() {
// Check if the user is authenticated
const session = await auth();
Expand Down
6 changes: 0 additions & 6 deletions apps/blade/src/app/admin/hackathon/data/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";

import { auth } from "@forge/auth";
Expand All @@ -9,11 +8,6 @@ import { api, HydrateClient } from "~/trpc/server";
import HackerEventDemographics from "../../club/data/_components/HackerEventDemographics";
import HackathonDataContent from "./_components/HackathonDataContent";

export const metadata: Metadata = {
title: "Blade | Hackathon Data",
description: "View hackathon demographics.",
};

export default async function HackathonData() {
const session = await auth();
if (!session) {
Expand Down
6 changes: 0 additions & 6 deletions apps/blade/src/app/admin/hackathon/events/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";

import { auth } from "@forge/auth";
Expand All @@ -9,11 +8,6 @@ import { AddPoints } from "../../_components/AddPoints";
import ScannerPopUp from "../../club/members/_components/scanner";
import { EventsTable } from "./_components/events-table";

export const metadata: Metadata = {
title: "Blade Hackathon Events",
description: "Manage Knight Hacks hackathon events.",
};

export default async function HackathonEvents() {
// Check if the user is authenticated
const session = await auth();
Expand Down
6 changes: 0 additions & 6 deletions apps/blade/src/app/admin/hackathon/hackers/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";

import { auth } from "@forge/auth";
Expand All @@ -7,11 +6,6 @@ import { SIGN_IN_PATH } from "~/consts";
import { api, HydrateClient } from "~/trpc/server";
import HackerClient from "./hacker-client";

export const metadata: Metadata = {
title: "Blade | Judge Assignment",
description: "Generate Magic Links for Judges",
};

export default async function Hackers() {
const session = await auth();
if (!session) redirect(SIGN_IN_PATH);
Expand Down
6 changes: 0 additions & 6 deletions apps/blade/src/app/admin/hackathon/judge-assignment/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";

import { auth } from "@forge/auth";
Expand All @@ -7,11 +6,6 @@ import { SIGN_IN_PATH } from "~/consts";
import { api } from "~/trpc/server";
import QRCodesClient from "./_components/judges-client";

export const metadata: Metadata = {
title: "Blade | Judges",
description: "Manage Knight Hacks Judges.",
};

export default async function Judges() {
const session = await auth();
if (!session) redirect(SIGN_IN_PATH);
Expand Down
6 changes: 0 additions & 6 deletions apps/blade/src/app/admin/hackathon/roomAssignment/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";

import { auth } from "@forge/auth";
Expand All @@ -7,11 +6,6 @@ import { SIGN_IN_PATH } from "~/consts";
import { api, HydrateClient } from "~/trpc/server";
import { ChallengesTable } from "./_components/ChallengesTable";

export const metadata: Metadata = {
title: "Blade | Room Assignment",
description: "Assign room and populate judges information",
};

export default async function Hackers() {
const session = await auth();
if (!session) redirect(SIGN_IN_PATH);
Expand Down
6 changes: 0 additions & 6 deletions apps/blade/src/app/admin/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Metadata } from "next";
import Link from "next/link";
import { redirect } from "next/navigation";
import {
Expand Down Expand Up @@ -28,11 +27,6 @@ import {
import { SIGN_IN_PATH } from "~/consts";
import { api, HydrateClient } from "~/trpc/server";

export const metadata: Metadata = {
title: "Blade | Admin",
description: "Manage Knight Hacks as an administrator.",
};

export default async function Admin() {
const session = await auth();
if (!session) {
Expand Down
21 changes: 21 additions & 0 deletions apps/blade/src/app/forms/[formName]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";
import { XCircle } from "lucide-react";
import { stringify } from "superjson";
Expand All @@ -12,6 +13,26 @@ import { api, HydrateClient } from "~/trpc/server";
import FormNotFound from "./_components/form-not-found";
import { FormResponderWrapper } from "./_components/form-responder-client";

export async function generateMetadata({
params,
}: {
params: { formName: string };
}): Promise<Metadata> {
try {
const form = await api.forms.getForm({ slug_name: params.formName });
const description = `Official application for ${form.name} through Blade.`;

return {
title: `Blade | ${form.name}`,
description,
};
} catch {
return {
title: "Blade | Form Not Found",
};
}
}

function serializeSearchParams(
searchParams: Record<string, string | string[] | undefined>,
) {
Expand Down
6 changes: 6 additions & 0 deletions apps/blade/src/app/hacker/application/[hackathon-id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Metadata } from "next";
import Link from "next/link";
import { redirect } from "next/navigation";

Expand All @@ -6,6 +7,11 @@ import { auth, signIn } from "@forge/auth/server";
import { api } from "~/trpc/server";
import { HackerFormPage } from "../_components/hacker-application-form";

export const metadata: Metadata = {
title: "Blade | Hacker Application",
description: "Application to be a hacker",
};

export default async function HackerApplicationPage({
params,
}: {
Expand Down
6 changes: 0 additions & 6 deletions apps/blade/src/app/judge/results/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";

import { api, HydrateClient } from "~/trpc/server";
import ResultsTable from "./_components/results-table";

export const metadata: Metadata = {
title: "Blade | Hackthon Results",
description: "Display hackathon results",
};

export default async function ResultsDashboard() {
const hasAccess = await api.roles.hasPermission({
or: ["IS_JUDGE"],
Expand Down
6 changes: 6 additions & 0 deletions apps/blade/src/app/member/application/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";

import { auth, signIn } from "@forge/auth/server";

import { api } from "~/trpc/server";
import { MemberApplicationForm } from "./_components/member-application-form";

export const metadata: Metadata = {
title: "Blade | Member Application",
description: "Apply for Knight Hacks membership.",
};

export default async function MemberApplicationPage() {
const session = await auth();

Expand Down
7 changes: 7 additions & 0 deletions apps/blade/src/app/sponsor/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import { Button } from "@forge/ui/button";
export const metadata: Metadata = {
title: "Sponsor Knight Hacks!",
description: "Help us make dreams!",
openGraph: {
title: "Sponsor Knight Hacks!",
description: "Help us make dreams!",
url: "https://blade.knighthacks.org/sponsor",
siteName: "Blade",
images: [{ url: "https://club.knighthacks.org/community.png" }],
},
};

const STATS = [
Expand Down
6 changes: 6 additions & 0 deletions apps/club/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ export const metadata: Metadata = {
"UCF's largest hackathon and software engineering organization",
url: "https://club.knighthacks.org",
siteName: "Knight Hacks",
images: [
{
url: "https://blade.knighthacks.org/banner.png",
alt: "Knight Hacks Banner",
},
],
},
};

Expand Down
6 changes: 6 additions & 0 deletions apps/guild/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ export const metadata: Metadata = {
"View the Guild Collective of Knight Hacks, a community of technologists at the University of Central Florida.",
url: "https://guild.knighthacks.org",
siteName: "Knight Hacks",
images: [
{
url: "https://blade.knighthacks.org/banner.png",
alt: "Knight Hacks Banner",
},
],
},
};

Expand Down