(FIX): Simple fixes that got pointed out last week.
Back to docker fixes.
This commit is contained in:
parent
f93ff6501a
commit
cbaf34d39c
@ -86,7 +86,7 @@ export default function RecipeSearchBar({ redirect, searchOnLoad, favorites, set
|
||||
|
||||
return (
|
||||
<form className="w-full px-4 my-8" onSubmit={(e) => void searchHandler(e)}>
|
||||
<div className="flex w-full gdisbaledap-x-2">
|
||||
<div className="flex w-full gap-x-2">
|
||||
<div className="relative w-full">
|
||||
<input type="hidden" name="redirect" value={JSON.stringify(redirect)} />
|
||||
<input
|
||||
@ -95,7 +95,7 @@ export default function RecipeSearchBar({ redirect, searchOnLoad, favorites, set
|
||||
placeholder="Search recipes, ingredients..."
|
||||
value={filters ? filters.Search : ""}
|
||||
onChange={queryInputHandler}
|
||||
className="w-[99%] pr-4 pl-10 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||
className="w-full pr-4 pl-10 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||
/>
|
||||
<button className="absolute left-3 top-1/2 -translate-y-1/2">
|
||||
<svg
|
||||
|
||||
@ -17,6 +17,7 @@ import { CreateRecipe } from "../services/RecipeService";
|
||||
import type { CreateRecipeRequest } from "../types/api/recipe";
|
||||
import { isApiError } from "../types/api/error";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import ROUTE_CONSTANTS from "../types/routes";
|
||||
|
||||
// TODO: Move these
|
||||
export interface RecipeValidationEntry {
|
||||
@ -158,7 +159,7 @@ export default function Create() {
|
||||
return;
|
||||
}
|
||||
// TODO: Success toast!
|
||||
await navigate(`/web/recipe/${response.Id}`);
|
||||
await navigate(ROUTE_CONSTANTS.Recipe(response.Id));
|
||||
};
|
||||
|
||||
// Import ingredients
|
||||
|
||||
@ -8,6 +8,7 @@ const ROUTE_CONSTANTS: {
|
||||
ShoppingList: string;
|
||||
Login: string;
|
||||
History: string;
|
||||
Recipe: (id: number) => string;
|
||||
} = {
|
||||
Home: `${VERSION_FLAG}/web/home`,
|
||||
Favorites: `${VERSION_FLAG}/web/favorites`,
|
||||
@ -16,6 +17,7 @@ const ROUTE_CONSTANTS: {
|
||||
ShoppingList: `${VERSION_FLAG}/web/list`,
|
||||
Login: `${VERSION_FLAG}/web/login`,
|
||||
History: `${VERSION_FLAG}/web/history`,
|
||||
Recipe: (id: number) => `${VERSION_FLAG}/web/recipe/${id}`,
|
||||
};
|
||||
|
||||
export default ROUTE_CONSTANTS;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user