Skip to content

Commit

Permalink
Add image to home page and update some metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Draikth committed Jul 10, 2024
1 parent 6ef62a6 commit d919319
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The site is supposed to act as a collective reference point for all these variou
## Technologies

- Next.js
- Postgres.js
- PostgreSQL
- Jest
- Playwright

Expand Down
3 changes: 0 additions & 3 deletions app/events/page.js

This file was deleted.

8 changes: 8 additions & 0 deletions app/events/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export const metadata = {
title: 'Upcoming Events',
description: 'Upcoming events around the city',
};

export default function EventsPage() {
return <h1>Upcoming Events</h1>;
}
13 changes: 9 additions & 4 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import './globals.scss';
import type { Metadata } from 'next';
import localFont from 'next/font/local';
import { cookies } from 'next/headers';
import Link from 'next/link';
Expand All @@ -17,17 +16,23 @@ const geistMono = localFont({
weight: '100 900',
});

export const metadata: Metadata = {
title: 'Event Network',
description: 'Generated by create next app',
export const metadata = {
title: {
default: 'Event Network Project | Uplvl Final Proj',
template: '%s | Uplvl Final Proj',
},
description:
'Reference point for information on events happening around the city',
};

type Props = {
children: React.ReactNode;
};
export default async function RootLayout({ children }: Props) {
// Check if the sessionToken cookie exists.
const sessionCookie = cookies().get('sessionToken');

// Get the current logged in user from the database using the sessionToken value
const user = sessionCookie && (await getUser(sessionCookie.value));

return (
Expand Down
10 changes: 10 additions & 0 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Image from 'next/image';
import styles from './page.module.scss';

export default function Home() {
Expand All @@ -8,6 +9,15 @@ export default function Home() {
<h1>Welcome to the Event Network Project!</h1>
<p>A place to find what might be happening around the city!</p>
</hgroup>
<br />
<div>
<Image
src="/images/outdoor-event.webp"
alt="Outdoor event with crowd"
width={620}
height={620}
/>
</div>
</main>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion app/profile/[username]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type Props = {
};
};

export default async function UserProfile(props: Props) {
export default async function UserProfilePage(props: Props) {
// 1. Check if the sessionToken cookie exists
const sessionCookie = cookies().get('sessionToken');

Expand Down
Binary file added public/images/outdoor-event.webp
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit d919319

Please sign in to comment.