Skip to content
Snippets Groups Projects

aaaaaaaaa

Merged Yusuf Akgül requested to merge feat.GamesUIFixes into main
24 files
+ 663
470
Compare changes
  • Side-by-side
  • Inline
Files
24
@@ -2,12 +2,12 @@ import AddGameToList from "@/components/addGameToList";
@@ -2,12 +2,12 @@ import AddGameToList from "@/components/addGameToList";
import { AspectRatio } from "@/components/ui/aspect-ratio";
import { AspectRatio } from "@/components/ui/aspect-ratio";
import { Button } from "@/components/ui/button";
import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
import { Card } from "@/components/ui/card";
 
import { db } from "@/lib/db";
import { getGame } from "@/lib/igdb";
import { getGame } from "@/lib/igdb";
import { getCurrentUser } from "@/lib/session";
import { getCurrentUser } from "@/lib/session";
import { formatDate } from "@/lib/utils";
import { formatDate } from "@/lib/utils";
import { IGame } from "@/types/igdb-types";
import { IGame } from "@/types/igdb-types";
import Image from "next/image";
import Image from "next/image";
import { db } from "@/lib/db";
// renders a single game detail page
// renders a single game detail page
export default async function GameDetail({ params }: { params: { gameid: string } }) {
export default async function GameDetail({ params }: { params: { gameid: string } }) {
@@ -22,9 +22,6 @@ export default async function GameDetail({ params }: { params: { gameid: string
@@ -22,9 +22,6 @@ export default async function GameDetail({ params }: { params: { gameid: string
}
}
})
})
/* console.log(user) */
const companies = data[0].involved_companies.map((company) => {
const companies = data[0].involved_companies.map((company) => {
if (company !== data[0].involved_companies[0]) {
if (company !== data[0].involved_companies[0]) {
return `, ${company.company.name}`
return `, ${company.company.name}`
@@ -33,9 +30,7 @@ export default async function GameDetail({ params }: { params: { gameid: string
@@ -33,9 +30,7 @@ export default async function GameDetail({ params }: { params: { gameid: string
})
})
return (
return (
<div className="main-content h-full">
<div className="main-content h-full">
<Card className="w-full h-full overflow-hidden">
<Card className="w-full h-full overflow-hidden">
<div className="h-64 overflow-hidden">
<div className="h-64 overflow-hidden">
<AspectRatio ratio={889 / 500}>
<AspectRatio ratio={889 / 500}>
@@ -85,7 +80,10 @@ export default async function GameDetail({ params }: { params: { gameid: string
@@ -85,7 +80,10 @@ export default async function GameDetail({ params }: { params: { gameid: string
</div>
</div>
</div>
</div>
<div className="px-6 md:px-12">
<div className="px-6 md:px-12">
{/* <div className="border-b border-gray-400 dark:border-gray-200" /> */}
<div className="border-b border-gray-400 dark:border-gray-200" />
 
<div className="p-6 w-full flex justify-center">
 
{user && <AddGameToList userGameList={fullUser?.favGameList!} gameId={params.gameid} />}
 
</div>
{/* comments */}
{/* comments */}
</div>
</div>
</Card >
</Card >
@@ -108,7 +106,6 @@ export default async function GameDetail({ params }: { params: { gameid: string
@@ -108,7 +106,6 @@ export default async function GameDetail({ params }: { params: { gameid: string
</div>
</div>
</Card>
</Card>
</div>
</div>
<AddGameToList userGameList={fullUser?.favGameList!} gameId={params.gameid} />
</div >
</div >
)
)
}
}
\ No newline at end of file
Loading