Browse Source

refactor: update API base URL to use environment variable and remove console.log statements

master
sina_sajjadi 2 weeks ago
parent
commit
48fb7f3853
  1. 2
      src/api/http.tsx
  2. 1
      src/components/layout/mobile-navigation.tsx
  3. 1
      src/pages/duas/[slug].tsx

2
src/api/http.tsx

@ -6,7 +6,7 @@ if (typeof window !== 'undefined') {
locale = localStorage.getItem('locale') || 'en'; locale = localStorage.getItem('locale') || 'en';
} }
const http = axios.create({ const http = axios.create({
baseURL: 'https://habibapp.com',
baseURL: process.env.NEXT_PUBLIC_REST_API_ENDPOINT,
// headers: { // headers: {
// 'Authorization': 'Token 36d8be53bed5cab8027b66952b3f2c334cdca664', // 'Authorization': 'Token 36d8be53bed5cab8027b66952b3f2c334cdca664',
// }, // },

1
src/components/layout/mobile-navigation.tsx

@ -16,7 +16,6 @@ const MobileNavigation = () => {
const { t } = useTranslation("common"); // Use the translation hook for common translations const { t } = useTranslation("common"); // Use the translation hook for common translations
const isRTL = const isRTL =
rtlLanguages.includes(i18n?.language) || false; rtlLanguages.includes(i18n?.language) || false;
console.log(i18n?.language);
const sidebarVariants = { const sidebarVariants = {
hidden: { x: isRTL ? "100%" : "-100%" }, // Start off-screen to the right for RTL, left for LTR hidden: { x: isRTL ? "100%" : "-100%" }, // Start off-screen to the right for RTL, left for LTR

1
src/pages/duas/[slug].tsx

@ -118,7 +118,6 @@ const DuaComponent: React.FC<DuaComponentProps> = ({
} }
fetchData(); fetchData();
}, [slug]); }, [slug]);
console.log(data);
const playAudio = useCallback( const playAudio = useCallback(
(part: Dua) => { (part: Dua) => {

Loading…
Cancel
Save