From 48fb7f38530fb40189538f04c41a1af8462e04b6 Mon Sep 17 00:00:00 2001 From: sina_sajjadi Date: Thu, 6 Feb 2025 18:23:02 +0330 Subject: [PATCH] refactor: update API base URL to use environment variable and remove console.log statements --- src/api/http.tsx | 2 +- src/components/layout/mobile-navigation.tsx | 1 - src/pages/duas/[slug].tsx | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/api/http.tsx b/src/api/http.tsx index a3185f8..1f8ae9b 100644 --- a/src/api/http.tsx +++ b/src/api/http.tsx @@ -6,7 +6,7 @@ if (typeof window !== 'undefined') { locale = localStorage.getItem('locale') || 'en'; } const http = axios.create({ - baseURL: 'https://habibapp.com', + baseURL: process.env.NEXT_PUBLIC_REST_API_ENDPOINT, // headers: { // 'Authorization': 'Token 36d8be53bed5cab8027b66952b3f2c334cdca664', // }, diff --git a/src/components/layout/mobile-navigation.tsx b/src/components/layout/mobile-navigation.tsx index f5a3c84..fbcc963 100644 --- a/src/components/layout/mobile-navigation.tsx +++ b/src/components/layout/mobile-navigation.tsx @@ -16,7 +16,6 @@ const MobileNavigation = () => { const { t } = useTranslation("common"); // Use the translation hook for common translations const isRTL = rtlLanguages.includes(i18n?.language) || false; - console.log(i18n?.language); const sidebarVariants = { hidden: { x: isRTL ? "100%" : "-100%" }, // Start off-screen to the right for RTL, left for LTR diff --git a/src/pages/duas/[slug].tsx b/src/pages/duas/[slug].tsx index a7e5c26..20a18ed 100644 --- a/src/pages/duas/[slug].tsx +++ b/src/pages/duas/[slug].tsx @@ -118,7 +118,6 @@ const DuaComponent: React.FC = ({ } fetchData(); }, [slug]); -console.log(data); const playAudio = useCallback( (part: Dua) => {