Skip to content
Snippets Groups Projects
Commit 485a837a authored by Blersch Lara's avatar Blersch Lara
Browse files

#15 currentSort in garden is passed to the backend

parent a0ed02b8
No related branches found
No related tags found
1 merge request!41Wishlist frontend
......@@ -14,7 +14,7 @@ function Garten() {
useEffect(() => {
(async () => {
const result = await bc.getGardenEntries();
const result = await bc.getGardenEntries(currentSort);
if (result.err) {
setError(result.err);
} else {
......@@ -72,32 +72,4 @@ function Garten() {
);
}
/*return (
<>
<div>
<h2>Deine Wunschliste</h2>
<DropDownFilter
topic={"Sortierung der Pflanzen im Garten"}
options={[
"neueste zuerst",
"als nächstes anpflanzbar",
"als nächstes erntbar",
]}
filterOnChange={handleSortOptions}
/>
<button onClick={handleClearGarden}>Garten leeren</button>
</div>
{error ? (
<p>Error fetching data</p>
) : (
<ul style={{display: "flex", gap: "1rem", width: "100%"}}>
{plants?.map((plant) => (
<PlantCard plant={plant} key={plant.id}/>
))}
</ul>
)}
</>
);*/
export default Garten;
\ No newline at end of file
......@@ -15,7 +15,6 @@ function Wunschliste() {
useEffect(() => {
(async () => {
console.log("abc")
const result = await bc.getWishlistEntries(currentSort);
if (result.err) {
setError(result.err);
......@@ -72,33 +71,4 @@ function Wunschliste() {
</>
);
}
/*return (
<>
<div>
<h2>Deine Wunschliste</h2>
<DropDownFilter
topic={"Sortierung der Pflanzen in der Wunschliste"}
options={[
"neueste zuerst",
"als nächstes anpflanzbar",
"jetzt anpflanzbar",
]}
filterOnChange={handleSortOptions}
/>
<button onClick={handleClearWishList}>Wunschliste leeren</button>
</div>
{error ? (
<p>Error fetching data</p>
) : (
<ul style={{display: "flex", gap: "1rem", width: "100%"}}>
{plants?.map((plant) => (
<PlantCard plant={plant} key={plant.id}/>
))}
</ul>
)}
</>
);
}*/
export default Wunschliste;
\ No newline at end of file
export default Wunschliste;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment