Skip to content

Commit 7f2c47b

Browse files
committed
Merge branch 'main' into issue-77-Incorporate_playable_games_into_individual_game_pages
2 parents f03c36f + 3fb5dc1 commit 7f2c47b

13 files changed

Lines changed: 263 additions & 217 deletions

File tree

client/package-lock.json

Lines changed: 52 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
"@tanstack/react-query": "^5.80.7",
2323
"@tanstack/react-query-devtools": "^5.80.7",
2424
"autoprefixer": "^10.4.21",
25-
"axios": "^1.12.0",
25+
"axios": "^1.13.5",
2626
"class-variance-authority": "^0.7.1",
2727
"clsx": "^2.1.1",
2828
"framer-motion": "^12.23.24",
2929
"is-inside-container": "^1.0.0",
3030
"lucide-react": "^0.516.0",
31-
"next": "15.4.11",
31+
"next": "15.5.10",
3232
"react": "19.1.0",
3333
"react-dom": "19.1.0",
3434
"react-social-icons": "^6.25.0",

client/public/frame.svg

Lines changed: 0 additions & 9 deletions
This file was deleted.

client/public/pixel-art-frame.svg

Lines changed: 9 additions & 0 deletions
Loading

client/src/components/main/MemberProfile.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ export function MemberProfile({ member }: MemberProfileProps) {
5454
)}
5555
</div>
5656
<Image
57-
src="/frame.svg"
57+
src="/pixel-art-frame.svg"
5858
alt="golden pixel art frame around profile picture"
59-
width={176}
60-
height={192}
61-
className="z-0 h-48 w-44"
59+
width={200}
60+
height={200}
61+
className="z-10"
6262
/>
6363
</div>
6464
<div className="flex w-4/5 flex-col gap-2 rounded-md p-2.5 font-firaCode">
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import Image from "next/image";
2+
import Link from "next/link";
3+
4+
import { useGameshowcase } from "@/hooks/useGameshowcase";
5+
6+
export default function LandingGames() {
7+
const { data: showcases, isPending, isError, error } = useGameshowcase();
8+
if (isPending) {
9+
return (
10+
<main className="mx-auto min-h-screen max-w-7xl px-6 py-16">
11+
<p>Loading games...</p>
12+
</main>
13+
);
14+
}
15+
16+
if (!showcases || showcases.length === 0) {
17+
return (
18+
<div>
19+
<p> No Games Showcased Yet</p>
20+
</div>
21+
);
22+
}
23+
24+
if (isError) {
25+
const errorMessage =
26+
error?.response?.status === 404
27+
? "Games not found."
28+
: "Failed to Load Games";
29+
return (
30+
<div>
31+
<p className="text-red-500" role="alert">
32+
{errorMessage}
33+
</p>
34+
</div>
35+
);
36+
}
37+
return (
38+
<div className="grid grid-cols-1 gap-10 md:grid-cols-3">
39+
{showcases.slice(0, 3).map((game) => (
40+
<div
41+
key={game.game_id}
42+
className="rounded-xl p-6 text-background duration-200 ease-in-out hover:scale-110"
43+
>
44+
<Link key={game.game_id} href={`/games/${game.game_id}`}>
45+
<div className="relative aspect-[16/9] w-full overflow-hidden rounded-lg">
46+
<Image
47+
src={game.gameCover}
48+
alt={game.game_name}
49+
fill
50+
className="object-cover"
51+
/>
52+
</div>
53+
<h3 className="mb-2 mt-4 font-jersey10 text-2xl text-white">
54+
{game.game_name}
55+
</h3>
56+
57+
<p className="mb-4 truncate text-sm text-primary">
58+
{game.game_description}
59+
</p>
60+
<div className="h-px w-full bg-white/30" />
61+
</Link>
62+
</div>
63+
))}
64+
</div>
65+
);
66+
}

client/src/pages/about.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export default function AboutPage() {
118118
key={`top-${idx}`}
119119
className="flex flex-col items-start gap-0"
120120
>
121-
<div className="relative flex h-[11.25rem] w-[11.25rem] items-center justify-center bg-[url('/frame.svg')] bg-contain bg-center bg-no-repeat">
121+
<div className="relative flex h-[11.25rem] w-[11.25rem] items-center justify-center bg-[url('/pixel-art-frame.svg')] bg-contain bg-center bg-no-repeat">
122122
<Image
123123
src={
124124
member.profile_picture === null
@@ -128,7 +128,7 @@ export default function AboutPage() {
128128
alt="/landing_placeholder.png"
129129
width={108}
130130
height={108}
131-
className="mb-2 h-[6.75rem] w-[6.75rem]"
131+
className="h-[7.25rem] w-[6.75rem]"
132132
/>
133133
</div>
134134
<div className="w-[11.25rem] pl-3 text-left font-firaCode text-[0.5rem] leading-tight">
@@ -150,7 +150,7 @@ export default function AboutPage() {
150150
key={`bottom-${idx}`}
151151
className="flex flex-col items-start gap-0"
152152
>
153-
<div className="relative flex h-[11.25rem] w-[11.25rem] items-center justify-center bg-[url('/frame.svg')] bg-contain bg-center bg-no-repeat">
153+
<div className="relative flex h-[11.25rem] w-[11.25rem] items-center justify-center bg-[url('/pixel-art-frame.svg')] bg-contain bg-center bg-no-repeat">
154154
<Image
155155
src={
156156
member.profile_picture === null
@@ -160,7 +160,7 @@ export default function AboutPage() {
160160
alt="/landing_placeholder.png"
161161
width={108}
162162
height={108}
163-
className="mb-2 h-[6.75rem] w-[6.75rem]"
163+
className="h-[7.25rem] w-[6.75rem]"
164164
/>
165165
</div>
166166
<div className="w-[11.25rem] pl-3 text-left font-firaCode text-[0.5rem] leading-tight">

0 commit comments

Comments
 (0)