diff options
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/_app.jsx | 4 | ||||
| -rw-r--r-- | src/pages/api/user-activity.js | 16 | ||||
| -rw-r--r-- | src/pages/google_merchant/products/[page].js | 4 |
3 files changed, 20 insertions, 4 deletions
diff --git a/src/pages/_app.jsx b/src/pages/_app.jsx index a8d18917..4c4fed89 100644 --- a/src/pages/_app.jsx +++ b/src/pages/_app.jsx @@ -53,9 +53,9 @@ function MyApp({ Component, pageProps }) { <motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} - exit={{ opacity: 0, transition: { delay: 0.05 } }} + exit={{ opacity: 0 }} transition={{ - duration: 0.15 + duration: 0.1 }} className='fixed w-screen h-screen z-[500] bg-white flex justify-center items-center' > diff --git a/src/pages/api/user-activity.js b/src/pages/api/user-activity.js new file mode 100644 index 00000000..04daa9a6 --- /dev/null +++ b/src/pages/api/user-activity.js @@ -0,0 +1,16 @@ +import odooApi from "@/core/api/odooApi"; + +export default async function handler(req, res) { + res.setHeader('Cache-Control', 'no-cache'); + const data = { + 'page_title' : req.query.page_title, + 'url' : req.query.url, + 'ip_address' : req.query.ip, + } + + const sendData = await odooApi('POST', '/api/v1/activity', data) + + // Kirim respons ke klien + res.status(200).json({ message: 'OK' }); + } +
\ No newline at end of file diff --git a/src/pages/google_merchant/products/[page].js b/src/pages/google_merchant/products/[page].js index 1e70d24f..65e1ebbe 100644 --- a/src/pages/google_merchant/products/[page].js +++ b/src/pages/google_merchant/products/[page].js @@ -43,11 +43,11 @@ export async function getServerSideProps({ res, query }) { 'g:condition': { '#text': 'new' }, 'g:availability': { '#text': 'in_stock' }, 'g:brand': { '#text': product.manufacture?.name || '' }, - 'g:price': { '#text': `${Math.floor(product.lowestPrice.price)} IDR` } + 'g:price': { '#text': `${Math.floor(product.lowestPrice.price * 1.11)} IDR` } } if (product.lowestPrice.discountPercentage > 0) { item['g:sale_price'] = { - '#text': `${Math.floor(product.lowestPrice.priceDiscount)} IDR` + '#text': `${Math.floor(product.lowestPrice.priceDiscount * 1.11)} IDR` } } productItems.push(item) |
