From c0b38013bb97a995148b14301d26996ef15d4c7a Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Thu, 25 Jan 2024 09:15:27 +0700
Subject: Disable user activity log

---
 src/core/components/layouts/BasicLayout.jsx | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

(limited to 'src/core/components/layouts/BasicLayout.jsx')

diff --git a/src/core/components/layouts/BasicLayout.jsx b/src/core/components/layouts/BasicLayout.jsx
index 2962a08b..13cdfc86 100644
--- a/src/core/components/layouts/BasicLayout.jsx
+++ b/src/core/components/layouts/BasicLayout.jsx
@@ -42,20 +42,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 />
-- 
cgit v1.2.3


From e35595250f9e0408e23d1da3ac30ac1179e2a376 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Sat, 27 Jan 2024 11:46:36 +0700
Subject: Refactor layout

---
 src/core/components/layouts/BasicLayout.jsx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src/core/components/layouts/BasicLayout.jsx')

diff --git a/src/core/components/layouts/BasicLayout.jsx b/src/core/components/layouts/BasicLayout.jsx
index 13cdfc86..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,
-- 
cgit v1.2.3

