File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -558,8 +558,12 @@ const ListDevboxesUI = ({
558558 onBack = { ( ) => {
559559 setShowCreate ( false ) ;
560560 } }
561- onCreate = { ( ) => {
561+ onCreate = { ( devbox ) => {
562562 setShowCreate ( false ) ;
563+ // Navigate to the newly created devbox's detail page
564+ if ( onNavigateToDetail ) {
565+ onNavigateToDetail ( devbox . id ) ;
566+ }
563567 } }
564568 />
565569 ) ;
Original file line number Diff line number Diff line change 33 * Refactored from components/DevboxCreatePage.tsx
44 */
55import React from "react" ;
6+ import type { DevboxView } from "@runloop/api-client/resources/devboxes/devboxes" ;
67import { useNavigation } from "../store/navigationStore.js" ;
78import { DevboxCreatePage } from "../components/DevboxCreatePage.js" ;
89
910export function DevboxCreateScreen ( ) {
10- const { goBack } = useNavigation ( ) ;
11+ const { goBack, navigate } = useNavigation ( ) ;
1112
12- const handleCreate = ( ) => {
13- // After creation, go back to list (which will refresh)
14- goBack ( ) ;
13+ const handleCreate = ( devbox : DevboxView ) => {
14+ // After creation, navigate to the devbox detail page
15+ navigate ( "devbox-detail" , { devboxId : devbox . id } ) ;
1516 } ;
1617
1718 return < DevboxCreatePage onBack = { goBack } onCreate = { handleCreate } /> ;
Original file line number Diff line number Diff line change @@ -7,3 +7,4 @@ const noop = () => () => {};
77export default noop ;
88export const onExit = noop ;
99
10+
You can’t perform that action at this time.
0 commit comments