Base environments fully working

This commit is contained in:
Gregory Schier
2023-11-02 18:43:39 -07:00
parent 1cd6e0af06
commit 68ea718c77
9 changed files with 57 additions and 33 deletions

View File

@@ -53,18 +53,18 @@ export function useAppRoutes() {
}, [nav]);
const setEnvironment = useCallback(
({ id: environmentId }: Environment) => {
(environment: Environment | null) => {
if (workspaceId == null) {
navigate('workspaces');
} else if (requestId == null) {
navigate('workspace', {
workspaceId: workspaceId,
environmentId: environmentId ?? null,
environmentId: environment == null ? undefined : environment.id,
});
} else {
navigate('request', {
workspaceId,
environmentId: environmentId ?? null,
environmentId: environment == null ? undefined : environment.id,
requestId,
});
}