refactor(StorePage): remove unnecessary code and update placeholder text in Select component

The code in the Select component was unnecessarily filtering the data based on the selected value. This logic was removed as it was not needed. Additionally, the placeholder text in the Select component was updated from "Flows" to "Both" to better reflect the options available.
This commit is contained in:
cristhianzl 2023-10-30 15:04:11 -03:00
commit f17d95f246

View file

@ -205,15 +205,9 @@ export default function StorePage(): JSX.Element {
</Button>
</div>
<div className="flex w-[13%] items-center justify-center gap-3 text-sm">
<Select
onValueChange={(value) => {
const filter = value === "Flow" ? false : true;
const search = data.filter((f) => f.is_component === filter);
value === "" ? setSearchData(data) : setSearchData(search);
}}
>
<Select onValueChange={(value) => {}}>
<SelectTrigger className="w-[180px]">
<SelectValue placeholder="Flows" />
<SelectValue placeholder="Both" />
</SelectTrigger>
<SelectContent>
<SelectItem value="Flow">Flows</SelectItem>