Skip to content

Commit

Permalink
Is Error Solved
Browse files Browse the repository at this point in the history
  • Loading branch information
sinanptm committed Sep 12, 2024
1 parent dba5519 commit b3472ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 2 additions & 4 deletions client/app/(landing-pages)/clinicians/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ import { TestimonialsSection } from "@/components/patient/clinicians/Testimonial
import { FAQSection } from "@/components/patient/clinicians/FAQSection";
import { CTASection } from "@/components/patient/clinicians/CTASection";
import DoctorPagination from "@/components/patient/clinicians/DoctorsSection";
import getConfig from "next/config";

const Page = async () => {
const { publicRuntimeConfig } = getConfig();
let api = publicRuntimeConfig.apiUrl || 'http://localhost:3000'
const response = await fetch(`${api}/doctors`, {
const apiUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000';
const response = await fetch(`${apiUrl}/doctors`, {
next: { revalidate: 60 },
});
const data = await response.json();
Expand Down
3 changes: 0 additions & 3 deletions client/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ const __dirname = path.dirname(__filename);

/** @type {import('next').NextConfig} */
const nextConfig = {
publicRuntimeConfig: {
apiUrl: process.env.NEXT_PUBLIC_API_URL,
},
images: {
remotePatterns: [
{
Expand Down

0 comments on commit b3472ef

Please sign in to comment.