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";
import { AspectRatio } from "@/components/ui/aspect-ratio";
import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
import { db } from "@/lib/db";
import { getGame } from "@/lib/igdb";
import { getCurrentUser } from "@/lib/session";
import { formatDate } from "@/lib/utils";
import { IGame } from "@/types/igdb-types";
import Image from "next/image";
import { db } from "@/lib/db";
// renders a single game detail page
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) => {
if (company !== data[0].involved_companies[0]) {
return `, ${company.company.name}`
@@ -33,9 +30,7 @@ export default async function GameDetail({ params }: { params: { gameid: string
})
return (
<div className="main-content h-full">
<Card className="w-full h-full overflow-hidden">
<div className="h-64 overflow-hidden">
<AspectRatio ratio={889 / 500}>
@@ -85,7 +80,10 @@ export default async function GameDetail({ params }: { params: { gameid: string
</div>
</div>
<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 */}
</div>
</Card >
@@ -108,7 +106,6 @@ export default async function GameDetail({ params }: { params: { gameid: string
</div>
</Card>
</div>
<AddGameToList userGameList={fullUser?.favGameList!} gameId={params.gameid} />
</div >
)
}
\ No newline at end of file
Loading