Skip to content

Commit

Permalink
fix: Rating in the search modal has now the correct value
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Groß <mail@gross-johannes.de>
  • Loading branch information
jo-gross committed Jan 12, 2025
1 parent 01466d3 commit 3cd8824
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions components/cocktails/CocktailRecipeCardItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ const CocktailRecipeCardItem = forwardRef<CocktailRecipeOverviewItemRef, Cocktai
if (typeof props.cocktailRecipe === 'string') {
fetchCocktail(workspaceId, props.cocktailRecipe, setLoadedCocktailRecipe, setCocktailRecipeLoading);
fetchCocktailRatings(workspaceId, props.cocktailRecipe, setCocktailRatings, setCocktailRatingsLoading, setCocktailRatingsError);
} else {
fetchCocktailRatings(workspaceId, props.cocktailRecipe.id, setCocktailRatings, setCocktailRatingsLoading, setCocktailRatingsError);
}
}, [workspaceId, props.cocktailRecipe]);

Expand Down
2 changes: 1 addition & 1 deletion components/ingredients/IngredientForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export function IngredientForm(props: IngredientFormProps) {

<div className={'form-control col-span-full'}>
<label className={'label'} htmlFor={'name'}>
<span className={'label-text'}>Bezeichner</span>
<span className={'label-text'}>Name der Zutat</span>
<span className={'label-text-alt space-x-2 text-error'}>
<span>
<>{errors.name && errors.name}</>
Expand Down
3 changes: 1 addition & 2 deletions components/modals/SearchModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ export function SearchModal(props: SearchModalProps) {
fetchCocktails('');
}, [fetchCocktails, workspaceId]);

const [submittingStatistic, setSubmittingStatistic] = useState(false);
const [submittingQueue, setSubmittingQueue] = useState(false);
const [cocktailRatings, setCocktailRatings] = useState<Record<string, number>>();

const renderCocktailCard = (cocktail: CocktailRecipeFull, index: number, isArchived: boolean, openCard: boolean = false) => (
<div
Expand Down

0 comments on commit 3cd8824

Please sign in to comment.