Spaces:
Running
Running
adrianpierce
commited on
Commit
•
739e47b
1
Parent(s):
9bb70c7
Update pages/2_Saved_Recipes.py
Browse files- pages/2_Saved_Recipes.py +2 -2
pages/2_Saved_Recipes.py
CHANGED
@@ -28,9 +28,9 @@ st.write("") # just some space
|
|
28 |
recipes_filtered = [x for x in recipes if user_search.lower() in x['name'].lower()]
|
29 |
if user_sort == 'Recent':
|
30 |
recipes_filtered.sort(key=lambda x: x['timestamp'])
|
31 |
-
|
32 |
recipes_filtered.sort(key=lambda x: x['timestamp'], reverse=True)
|
33 |
-
|
34 |
recipes_filtered.sort(key=lambda x: x['name'])
|
35 |
elif user_sort == 'Z-A':
|
36 |
recipes_filtered.sort(key=lambda x: x['name'], reverse=True)
|
|
|
28 |
recipes_filtered = [x for x in recipes if user_search.lower() in x['name'].lower()]
|
29 |
if user_sort == 'Recent':
|
30 |
recipes_filtered.sort(key=lambda x: x['timestamp'])
|
31 |
+
elif user_sort == 'Oldest':
|
32 |
recipes_filtered.sort(key=lambda x: x['timestamp'], reverse=True)
|
33 |
+
elif user_sort == 'A-Z':
|
34 |
recipes_filtered.sort(key=lambda x: x['name'])
|
35 |
elif user_sort == 'Z-A':
|
36 |
recipes_filtered.sort(key=lambda x: x['name'], reverse=True)
|