From dfbc890f2ce554439facfbe63219d8cd463336b1 Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Mon, 25 Mar 2024 11:04:42 -0500 Subject: [PATCH] fix: Recipe Search URL State (#3332) * fix several state issues with explore page - update state when there are no query params - only call search if the query params actually changed - wait until ready to call API * store last search query in user prefs * restore chip tag click to anonymous user --- .../components/Domain/Recipe/RecipeChips.vue | 5 +- .../Domain/Recipe/RecipeExplorerPage.vue | 149 ++++++++++++------ frontend/composables/use-users/preferences.ts | 2 + 3 files changed, 101 insertions(+), 55 deletions(-) diff --git a/frontend/components/Domain/Recipe/RecipeChips.vue b/frontend/components/Domain/Recipe/RecipeChips.vue index f7be748462b..a0b09cd1b93 100644 --- a/frontend/components/Domain/Recipe/RecipeChips.vue +++ b/frontend/components/Domain/Recipe/RecipeChips.vue @@ -9,7 +9,7 @@ color="accent" :small="small" dark - :to="isOwnGroup ? `${baseRecipeRoute}?${urlPrefix}=${category.id}` : undefined" + :to="`${baseRecipeRoute}?${urlPrefix}=${category.id}`" > {{ truncateText(category.name) }} @@ -18,7 +18,6 @@