Create / edit recipe form unification and improvements (#4693)

This commit is contained in:
Zane
2025-10-05 09:00:59 -07:00
committed by GitHub
parent ebb3888ff1
commit f4d79404ee
55 changed files with 4486 additions and 3074 deletions
+4 -5
View File
@@ -1,4 +1,5 @@
import { NavigateFunction } from 'react-router-dom';
import { Recipe } from '../api/types.gen';
export type View =
| 'welcome'
@@ -15,7 +16,6 @@ export type View =
| 'schedules'
| 'sharedSession'
| 'loading'
| 'recipeEditor'
| 'recipes'
| 'permission';
@@ -27,13 +27,14 @@ export type ViewOptions = {
sessionDetails?: unknown;
error?: string;
baseUrl?: string;
config?: unknown;
recipe?: Recipe;
parentView?: View;
parentViewOptions?: ViewOptions;
disableAnimation?: boolean;
initialMessage?: string;
resetChat?: boolean;
shareToken?: string;
resumeSessionId?: string;
};
export const createNavigationHandler = (navigate: NavigateFunction) => {
@@ -66,9 +67,7 @@ export const createNavigationHandler = (navigate: NavigateFunction) => {
case 'sharedSession':
navigate('/shared-session', { state: options });
break;
case 'recipeEditor':
navigate('/recipe-editor', { state: options });
break;
case 'welcome':
navigate('/welcome', { state: options });
break;