Skip to content
Snippets Groups Projects
Commit f793a351 authored by Yusuf Akgül's avatar Yusuf Akgül :hatching_chick:
Browse files

fix deployment url

parent 601e3b19
No related branches found
No related tags found
No related merge requests found
Pipeline #34308 passed
"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,
......
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment