summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ecosystem.config.js19
-rw-r--r--src/lib/home/components/CategoryHome.jsx2
2 files changed, 20 insertions, 1 deletions
diff --git a/ecosystem.config.js b/ecosystem.config.js
new file mode 100644
index 00000000..0429088a
--- /dev/null
+++ b/ecosystem.config.js
@@ -0,0 +1,19 @@
+module.exports = {
+ apps: [
+ {
+ name: 'next-indoteknik',
+ script: 'npm',
+ args: 'start',
+ instances: 'max',
+ autorestart: true,
+ watch: false,
+ max_memory_restart: '1G',
+ env: {
+ NODE_ENV: 'development'
+ },
+ env_production: {
+ NODE_ENV: 'production'
+ }
+ }
+ ]
+}
diff --git a/src/lib/home/components/CategoryHome.jsx b/src/lib/home/components/CategoryHome.jsx
index 181ba327..34c28728 100644
--- a/src/lib/home/components/CategoryHome.jsx
+++ b/src/lib/home/components/CategoryHome.jsx
@@ -7,7 +7,7 @@ const CategoryHome = ({ id }) => {
return (
<div className='p-4 sm:py-8 relative bg-gray-100 border border-gray-200 min-h-[240px]'>
- {categoryHome.data ? (
+ {categoryHome?.data?.length > 0 ? (
<ProductSlider
products={{
products: categoryHome.data?.[0].products,