Skip to content

Commit

Permalink
feat: add titles for all pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jsun969 committed Feb 19, 2024
1 parent d272e05 commit 7b88065
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/app/(account)/forgot-password/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ import ControlledField from '@/components/ControlledField';
import FancyRectangle from '@/components/FancyRectangle';
import { useSignIn } from '@clerk/nextjs';
import { zodResolver } from '@hookform/resolvers/zod';
import type { Metadata } from 'next';
import { useState } from 'react';
import { useForm } from 'react-hook-form';
import { z } from 'zod';
import { handleClerkErrors } from '../helpers';
import { codeSchema, emailSchema, passwordSchema } from '../schemas';

export const metadata: Metadata = {
title: 'Forgot Password',
};

const sendCodeSchema = z.object({
email: emailSchema,
});
Expand Down
7 changes: 6 additions & 1 deletion src/app/(account)/join/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import FancyRectangle from '@/components/FancyRectangle';
import Title from '@/components/Title';
import { SignedIn, SignedOut, useUser } from '@clerk/nextjs';
import type { Metadata } from 'next';
import Link from 'next/link';
import { useEffect } from 'react';
import ProgressBar from './ProgressBar';
Expand All @@ -12,7 +13,11 @@ import StepThree from './steps/StepThree';
import StepTwo from './steps/StepTwo';
import { useJoinUsHeading, useJoinUsStep } from './store';

export default function JoinUsPage() {
export const metadata: Metadata = {
title: 'Join',
};

export default function JoinPage() {
const { step, setStep } = useJoinUsStep();
const { heading } = useJoinUsHeading();

Expand Down
5 changes: 5 additions & 0 deletions src/app/(account)/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ import Title from '@/components/Title';
import { checkUserExists } from '@/server/check-user-exists';
import { verifyMembershipPayment } from '@/server/verify-membership-payment';
import { currentUser } from '@clerk/nextjs';
import type { Metadata } from 'next';
import Link from 'next/link';
import { notFound } from 'next/navigation';
import Settings from './Settings';

export const metadata: Metadata = {
title: 'Settings',
};

export default async function SettingsPage() {
const user = await currentUser();
if (!user) return notFound();
Expand Down
5 changes: 5 additions & 0 deletions src/app/(account)/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import ControlledField from '@/components/ControlledField';
import FancyRectangle from '@/components/FancyRectangle';
import { useSignIn } from '@clerk/clerk-react';
import { zodResolver } from '@hookform/resolvers/zod';
import type { Metadata } from 'next';
import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { useState } from 'react';
Expand All @@ -14,6 +15,10 @@ import { z } from 'zod';
import { handleClerkErrors } from '../helpers';
import { emailSchema } from '../schemas';

export const metadata: Metadata = {
title: 'Sign In',
};

const signInSchema = z.object({
email: emailSchema,
password: z.string().min(1, { message: 'Please enter your password' }),
Expand Down
7 changes: 6 additions & 1 deletion src/app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ import Paragraph from '@/components/Paragraph';
import Title from '@/components/Title';
import { COMMITTEE_MEMBERS } from '@/data/committee-members';
import { LINKS } from '@/data/links';
import type { Metadata } from 'next';
import Image from 'next/image';
import FAQ from './FAQ';

export default function AboutUs() {
export const metadata: Metadata = {
title: 'About',
};

export default function AboutPage() {
return (
<main className="relative">
<div className="h-full">
Expand Down
5 changes: 5 additions & 0 deletions src/app/admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ import FancyRectangle from '@/components/FancyRectangle';
import Title from '@/components/Title';
import { db } from '@/db';
import { currentUser } from '@clerk/nextjs';
import type { Metadata } from 'next';
import { notFound } from 'next/navigation';
import MemberForm from './MemberForm';

export const metadata: Metadata = {
title: 'Admin Panel',
};

const queryMembers = async () => {
const dbMembers = await db.query.memberTable.findMany({
columns: {
Expand Down
5 changes: 5 additions & 0 deletions src/app/contact/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import Title from '@/components/Title';
import type { Metadata } from 'next';
import Contact from './Contact';
import Form from './Form';
import Sponsorship from './Sponsorship';

export const metadata: Metadata = {
title: 'Contact',
};

export default function ContactPage() {
return (
<div className="h-full bg-[url('/images/rectangle-grid.svg')] bg-repeat-y md:bg-[length:90%_90%] md:bg-center md:bg-no-repeat">
Expand Down
5 changes: 5 additions & 0 deletions src/app/events/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import type { Metadata } from 'next';
import Image from 'next/image';
import Events from './Events';
import FridayNight from './FridayNight';
import Info from './Info';

export const metadata: Metadata = {
title: 'Events',
};

export default function EventsPage() {
return (
<main className="relative grid grid-cols-5 gap-y-12 text-lg md:text-xl">
Expand Down
5 changes: 4 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import { Archivo } from 'next/font/google';

export const metadata: Metadata = {
icons: '/favicon.ico',
title: 'Computer Science Club',
title: {
template: '%s | Computer Science Club',
default: 'Computer Science Club',
},
description:
'The University of Adelaide Computer Science Club is a student-run club for those with an interest in computer science or computing in general.',
};
Expand Down
5 changes: 5 additions & 0 deletions src/app/sponsors/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import Duck from '@/components/Duck';
import Paragraph from '@/components/Paragraph';
import Title from '@/components/Title';
import { YEAR } from '@/data/sponsors';
import type { Metadata } from 'next';

export const metadata: Metadata = {
title: 'Sponsors',
};

export default function SponsorsPage() {
return (
Expand Down

0 comments on commit 7b88065

Please sign in to comment.