From f793a351d21d483ed7e776ef604701f8492ff338 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Yusuf=20Akg=C3=BCl?= <s86116@bht-berlin.de>
Date: Wed, 24 May 2023 17:08:29 +0200
Subject: [PATCH] fix deployment url

---
 components/InfiniteScroll.tsx | 3 ++-
 lib/utils.ts                  | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/components/InfiniteScroll.tsx b/components/InfiniteScroll.tsx
index 884c4de..77b72b1 100644
--- a/components/InfiniteScroll.tsx
+++ b/components/InfiniteScroll.tsx
@@ -1,7 +1,7 @@
 "use client"
 
 import Game from "@/components/Game";
-import { Card, CardContent } from "@/components/ui/card";
+import { Card } from "@/components/ui/card";
 import { getBaseURL } from "@/lib/utils";
 import { IGame } from "@/types/igdb-types";
 import { useInfiniteQuery } from "@tanstack/react-query";
@@ -9,6 +9,7 @@ import { Fragment } from "react";
 import InfiniteScroll from "react-infinite-scroll-component";
 
 export function InfiniteScrollGames() {
+    console.log(getBaseURL())
     const {
         status,
         data,
diff --git a/lib/utils.ts b/lib/utils.ts
index 1253d12..b28079d 100644
--- a/lib/utils.ts
+++ b/lib/utils.ts
@@ -16,7 +16,7 @@ export function getImageURL(hashId: string, size: string): string {
 // returns the base url for the current environment, even considering current port
 export function getBaseURL(): string {
   return process.env.NODE_ENV === 'production'
-    ? process.env.PROD_URL ?? ''
+    ? process.env.NEXT_PUBLIC_APP_URL ?? ''
     : (typeof window !== 'undefined'
       ? `http://${window.location.hostname}:${window.location.port}`
       : 'http://localhost:3000')
-- 
GitLab