diff options
Diffstat (limited to 'src/core/components/layouts/BasicLayout.jsx')
| -rw-r--r-- | src/core/components/layouts/BasicLayout.jsx | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/core/components/layouts/BasicLayout.jsx b/src/core/components/layouts/BasicLayout.jsx index 2962a08b..b6e2c59f 100644 --- a/src/core/components/layouts/BasicLayout.jsx +++ b/src/core/components/layouts/BasicLayout.jsx @@ -1,15 +1,14 @@ import dynamic from 'next/dynamic'; import Image from 'next/image'; import { useEffect, useState } from 'react'; -import axios from 'axios'; +import { useProductContext } from '@/contexts/ProductContext'; import whatsappUrl from '@/core/utils/whatsappUrl'; -import odooApi from '@/core/api/odooApi'; import { useRouter } from 'next/router'; -import { useProductContext } from '@/contexts/ProductContext'; const Navbar = dynamic(() => import('../elements/Navbar/Navbar'), { ssr: false, + loading: () => <div className='h-[156px]' />, }); const AnimationLayout = dynamic(() => import('./AnimationLayout'), { ssr: false, @@ -42,20 +41,20 @@ const BasicLayout = ({ children }) => { } }, [product, router]); - useEffect(() => { - const getIP = async () => { - const ip = await odooApi('GET', '/api/ip-address'); - const data = { - page_title: document.title, - url: window.location.href, - ip: ip, - }; - axios.get( - `/api/user-activity?page_title=${data.page_title}&url=${data.url}&ip=${data.ip}` - ); - }; - getIP(); - }, []); + // useEffect(() => { + // const getIP = async () => { + // const ip = await odooApi('GET', '/api/ip-address'); + // const data = { + // page_title: document.title, + // url: window.location.href, + // ip: ip, + // }; + // axios.get( + // `/api/user-activity?page_title=${data.page_title}&url=${data.url}&ip=${data.ip}` + // ); + // }; + // getIP(); + // }, []); return ( <> <Navbar /> |
