diff --git a/pages/search.tsx b/pages/search.tsx
index bb892bdaf..1696d542f 100644
--- a/pages/search.tsx
+++ b/pages/search.tsx
@@ -39,6 +39,41 @@ const SORT = Object.entries({
'price-desc': 'Price: High to low',
})
+type SortItemsProps = {
+ q: string | string[] | undefined
+ sort: string | string[] | undefined
+ pathname: string
+}
+
+const SortItems = ({ pathname, sort, q }:SortItemsProps) => {
+ return (
+ <>
+
Sort
+
+
+ Relevance
+
+
+ {SORT.map(([key, text]) => (
+
+
+ {text}
+
+
+ ))}
+ >
+ )
+}
+
export default function Search({
categories,
brands,
@@ -69,9 +104,16 @@ export default function Search({
return (
-
+
+
- -
+
-
All Categories
@@ -79,7 +121,7 @@ export default function Search({
{categories.map((cat) => (
-
@@ -95,7 +137,7 @@ export default function Search({
))}
- -
+
-
All Designers
@@ -103,7 +145,7 @@ export default function Search({
{brands.flatMap(({ node }) => (
-
@@ -190,30 +232,13 @@ export default function Search({
)}
-
+
- - Sort
- -
-
- Relevance
-
-
- {SORT.map(([key, text]) => (
- -
-
- {text}
-
-
- ))}
+