-
- {Array(9)
- .fill(null)
- .map((_, index) => (
-
- ))}
+
+
+ {/* filter part */}
+
+
+ {/* main products */}
+
+ {Array(9)
+ .fill(null)
+ .map((_, index) => (
+
+ ))}
+
+
diff --git a/lib/filter-zustand.ts b/lib/filter-zustand.ts
new file mode 100644
index 0000000..8bc38b5
--- /dev/null
+++ b/lib/filter-zustand.ts
@@ -0,0 +1,33 @@
+import { create } from "zustand";
+
+interface FilterZustandTypes {
+ filter: string[];
+ removeFilter: (data: string) => void;
+ toggleFilter: (data: string) => void;
+ resetFilter: () => void;
+ hasFilter: (data: string) => boolean;
+}
+
+export const useFilter = create
((set, get) => ({
+ filter: [],
+
+ removeFilter: (data) =>
+ set((state) => ({
+ filter: state.filter.filter((item) => item !== data),
+ })),
+
+ // Toggle: mavjud bo'lsa o'chirish, yo'q bo'lsa qo'shish
+ toggleFilter: (data) =>
+ set((state) => {
+ if (state.filter.includes(data)) {
+ return { filter: state.filter.filter((item) => item !== data) };
+ }
+ return { filter: [...state.filter, data] };
+ }),
+
+ resetFilter: () => set({ filter: [] }),
+
+ hasFilter: (data) => {
+ return get().filter.includes(data);
+ },
+}));
\ No newline at end of file
diff --git a/package.json b/package.json
index ae838ee..b789d31 100644
--- a/package.json
+++ b/package.json
@@ -64,7 +64,8 @@
"tailwind-merge": "^3.3.1",
"tailwindcss-animate": "^1.0.7",
"vaul": "^1.1.2",
- "zod": "3.25.76"
+ "zod": "3.25.76",
+ "zustand": "^5.0.10"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.9",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index ee0d15f..06ce2ff 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -176,6 +176,9 @@ importers:
zod:
specifier: 3.25.76
version: 3.25.76
+ zustand:
+ specifier: ^5.0.10
+ version: 5.0.10(@types/react@19.2.9)(react@19.2.0)(use-sync-external-store@1.6.0(react@19.2.0))
devDependencies:
'@tailwindcss/postcss':
specifier: ^4.1.9
@@ -2006,6 +2009,24 @@ packages:
zod@3.25.76:
resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==}
+ zustand@5.0.10:
+ resolution: {integrity: sha512-U1AiltS1O9hSy3rul+Ub82ut2fqIAefiSuwECWt6jlMVUGejvf+5omLcRBSzqbRagSM3hQZbtzdeRc6QVScXTg==}
+ engines: {node: '>=12.20.0'}
+ peerDependencies:
+ '@types/react': '>=18.0.0'
+ immer: '>=9.0.6'
+ react: '>=18.0.0'
+ use-sync-external-store: '>=1.2.0'
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ immer:
+ optional: true
+ react:
+ optional: true
+ use-sync-external-store:
+ optional: true
+
snapshots:
'@alloc/quick-lru@5.2.0': {}
@@ -3687,3 +3708,9 @@ snapshots:
d3-timer: 3.0.1
zod@3.25.76: {}
+
+ zustand@5.0.10(@types/react@19.2.9)(react@19.2.0)(use-sync-external-store@1.6.0(react@19.2.0)):
+ optionalDependencies:
+ '@types/react': 19.2.9
+ react: 19.2.0
+ use-sync-external-store: 1.6.0(react@19.2.0)
diff --git a/public/images/products/products2.webp b/public/images/products/products2.webp
new file mode 100644
index 0000000..0af9df9
Binary files /dev/null and b/public/images/products/products2.webp differ
diff --git a/public/images/products/products3.webp b/public/images/products/products3.webp
new file mode 100644
index 0000000..e60cd6d
Binary files /dev/null and b/public/images/products/products3.webp differ
diff --git a/public/images/products/products4.webp b/public/images/products/products4.webp
new file mode 100644
index 0000000..54e688d
Binary files /dev/null and b/public/images/products/products4.webp differ
diff --git a/public/images/products/products5.webp b/public/images/products/products5.webp
new file mode 100644
index 0000000..6a6f359
Binary files /dev/null and b/public/images/products/products5.webp differ
diff --git a/public/images/products/products6.webp b/public/images/products/products6.webp
new file mode 100644
index 0000000..506a358
Binary files /dev/null and b/public/images/products/products6.webp differ
diff --git a/public/images/products/products7.webp b/public/images/products/products7.webp
new file mode 100644
index 0000000..af34ef8
Binary files /dev/null and b/public/images/products/products7.webp differ
diff --git a/public/images/products/products8.webp b/public/images/products/products8.webp
new file mode 100644
index 0000000..4fabae4
Binary files /dev/null and b/public/images/products/products8.webp differ