From dba551997321920e177816e2ee1cfe884633e516 Mon Sep 17 00:00:00 2001 From: Sinan Date: Thu, 12 Sep 2024 11:49:19 +0530 Subject: [PATCH] next config apiurl added --- client/app/(landing-pages)/clinicians/page.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/app/(landing-pages)/clinicians/page.tsx b/client/app/(landing-pages)/clinicians/page.tsx index 1ff56ad1..d7f8d5d3 100644 --- a/client/app/(landing-pages)/clinicians/page.tsx +++ b/client/app/(landing-pages)/clinicians/page.tsx @@ -8,7 +8,8 @@ import getConfig from "next/config"; const Page = async () => { const { publicRuntimeConfig } = getConfig(); - const response = await fetch(`${publicRuntimeConfig.apiUrl}/doctors`, { + let api = publicRuntimeConfig.apiUrl || 'http://localhost:3000' + const response = await fetch(`${api}/doctors`, { next: { revalidate: 60 }, }); const data = await response.json();