Skip to content

Commit dd610ff

Browse files
committed
Search page
1 parent afd08f5 commit dd610ff

6 files changed

Lines changed: 691 additions & 521 deletions

File tree

app/[locale]/(user)/components/Content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const Content = () => {
3636

3737
const handleSearch = (value: string) => {
3838
if (value) {
39-
router.push(`/datasets?query=${encodeURIComponent(value)}`);
39+
router.push(`/search?query=${encodeURIComponent(value)}`);
4040
}
4141
};
4242
const Metrics = [

app/[locale]/(user)/datasets/components/FIlter/Filter.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ const Filter: React.FC<FilterProps> = ({
3737
});
3838
};
3939

40+
console.log('options', options);
41+
4042
return (
4143
<div className="rounded-4 bg-surfaceDefault px-4 py-6 shadow-card">
4244
<div className="mb-5 flex justify-between">
@@ -89,7 +91,7 @@ const Filter: React.FC<FilterProps> = ({
8991
value={category}
9092
className=" border-surfaceDefault"
9193
>
92-
<AccordionTrigger className="flex w-full flex-wrap items-center gap-2 rounded-1 bg-[#1F5F8D1A] py-[10px] px-3 hover:no-underline">
94+
<AccordionTrigger className="flex w-full flex-wrap items-center gap-2 rounded-1 bg-[#1F5F8D1A] px-3 py-[10px] hover:no-underline">
9395
<Text fontWeight="medium">{toTitleCase(category)}</Text>
9496
</AccordionTrigger>
9597
<AccordionContent
@@ -103,18 +105,22 @@ const Filter: React.FC<FilterProps> = ({
103105
name={category}
104106
options={data.map((option) => ({
105107
...option,
106-
disabled: lockedFilters[category]?.includes(option.value) || false,
108+
disabled:
109+
lockedFilters[category]?.includes(option.value) ||
110+
false,
107111
}))}
108112
title={undefined}
109113
value={selectedOptions[category] || []}
110114
onChange={(values) => {
111115
// Prevent unselecting locked filters
112116
const locked = lockedFilters[category] || [];
113117
const newValues = values as string[];
114-
118+
115119
// Ensure all locked values remain selected
116-
const finalValues = Array.from(new Set([...locked, ...newValues]));
117-
120+
const finalValues = Array.from(
121+
new Set([...locked, ...newValues])
122+
);
123+
118124
setSelectedOptions(category, finalValues);
119125
}}
120126
/>

app/[locale]/(user)/datasets/dataset.module.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.Search {
22
input {
33
width: 80%;
4-
height: 36px;
4+
height: 46px;
55
}
66
/* In your global CSS/SCSS file */
77
div[class*='Input-module_Backdrop'] {
@@ -18,3 +18,7 @@
1818
max-width: 120px;
1919
}
2020
}
21+
22+
// .Select {
23+
// height: 100%;
24+
// }

0 commit comments

Comments
 (0)