summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-11-19 10:50:07 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-11-19 10:50:07 +0700
commit9f10b502da7e1d102ddb0b16175b828834ff6f44 (patch)
tree39326387686a77c73fabba133101d0cb7afc989e
parenta1e4d12c041dc8f06de531a9f7f287e07ccc81e8 (diff)
<iman> delete console log
-rw-r--r--src-migrate/pages/shop/cart/index.tsx2
-rw-r--r--src/pages/api/page-content.js1
-rw-r--r--src/pages/api/shop/search.js9
3 files changed, 1 insertions, 11 deletions
diff --git a/src-migrate/pages/shop/cart/index.tsx b/src-migrate/pages/shop/cart/index.tsx
index 70a28073..24baa933 100644
--- a/src-migrate/pages/shop/cart/index.tsx
+++ b/src-migrate/pages/shop/cart/index.tsx
@@ -35,8 +35,6 @@ const CartPage = () => {
const [hasChanged, setHasChanged] = useState(false);
const prevCartRef = useRef<CartItem[] | null>(null);
- console.log('ini cart', cart);
-
useEffect(() => {
const handleScroll = () => {
setIsTop(window.scrollY < 200);
diff --git a/src/pages/api/page-content.js b/src/pages/api/page-content.js
index 3cb8a237..a6514505 100644
--- a/src/pages/api/page-content.js
+++ b/src/pages/api/page-content.js
@@ -22,7 +22,6 @@ export default async function handler(req, res) {
if (!cachedData) {
const items = await getPageContent({ path });
- console.log('items', items);
await client.set(
`page-content:${path}`,
JSON.stringify(items),
diff --git a/src/pages/api/shop/search.js b/src/pages/api/shop/search.js
index 65927bbc..63ec7ca0 100644
--- a/src/pages/api/shop/search.js
+++ b/src/pages/api/shop/search.js
@@ -19,12 +19,7 @@ export default async function handler(req, res) {
source = '',
} = req.query;
-
-
- console.log('fq new', fq);
-
let { stock = '' } = req.query;
-
let paramOrderBy = '';
switch (orderBy) {
case 'flashsale-discount-desc':
@@ -93,7 +88,6 @@ export default async function handler(req, res) {
'price_tier1_v2_f:[1 TO *]',
];
-
if (fq && source != 'similar' && typeof fq != 'string') {
// filterQueries.push(fq);
fq.push(...filterQueries);
@@ -103,7 +97,7 @@ export default async function handler(req, res) {
let keywords = newQ;
if (source === 'similar' || checkQ.length < 3) {
if (checkQ.length < 2 || checkQ[1].length < 2) {
- keywords = newQ ;
+ keywords = newQ;
} else {
keywords = newQ + '*';
}
@@ -170,7 +164,6 @@ export default async function handler(req, res) {
parameter = parameter.concat(
fq.map((val) => `fq=${encodeURIComponent(val)}`)
);
-
let result = await axios(
process.env.SOLR_HOST + '/solr/product/select?' + parameter.join('&')
);