@@ -50,9 +50,7 @@ import { useIsMobile } from '@/hooks/use-mobile'
5050import { AppSidebar } from '@/components/app-sidebar'
5151import Loading from './loading'
5252
53- export function ProjectPageInternal ( { opencodeEnabled = false } : { opencodeEnabled ?: boolean } ) {
54- // Toggle to true to force expo-testing template during development
55- const EXPO_TESTING = false
53+ export function ProjectPageInternal ( { opencodeEnabled = false , template : templateOverride } : { opencodeEnabled ?: boolean ; template ?: 'expo-testing' | 'react-native-expo' } ) {
5654
5755 const params = useParams ( )
5856 const projectID = params ?. id as string
@@ -80,7 +78,7 @@ export function ProjectPageInternal({ opencodeEnabled = false }: { opencodeEnabl
8078 } )
8179 } , [ ] )
8280 const [ selectedTemplate , setSelectedTemplate ] = useState < 'auto' | TemplateId > (
83- EXPO_TESTING ? 'expo-testing' : 'react-native-expo' ,
81+ templateOverride || 'react-native-expo' ,
8482 )
8583 const [ languageModel , setLanguageModel ] = useCookieStorage < LLMModelConfig > (
8684 'languageModel' ,
@@ -1824,7 +1822,7 @@ export function ProjectPageInternal({ opencodeEnabled = false }: { opencodeEnabl
18241822 console . log ( 'Creating new project with:' , {
18251823 id : projectId ,
18261824 title : 'Generating project name...' ,
1827- template : EXPO_TESTING ? 'expo-testing' : ( templateFromUrl || selectedTemplate || 'react-native-expo' ) ,
1825+ template : templateOverride || templateFromUrl || selectedTemplate || 'react-native-expo' ,
18281826 userID : session ?. user ?. id ,
18291827 } )
18301828
@@ -1837,7 +1835,7 @@ export function ProjectPageInternal({ opencodeEnabled = false }: { opencodeEnabl
18371835 body : JSON . stringify ( {
18381836 id : projectId ,
18391837 title : 'Generating project name...' ,
1840- template : EXPO_TESTING ? 'expo-testing' : ( templateFromUrl || selectedTemplate || 'react-native-expo' ) ,
1838+ template : templateOverride || templateFromUrl || selectedTemplate || 'react-native-expo' ,
18411839 userID : session ?. user ?. id ,
18421840 } ) ,
18431841 } )
@@ -1969,7 +1967,7 @@ export function ProjectPageInternal({ opencodeEnabled = false }: { opencodeEnabl
19691967 projectId : project . id ,
19701968 userID : session ?. user ?. id ,
19711969 teamID : userTeam ?. id ,
1972- chooseTemplate : EXPO_TESTING ? 'expo-testing' : 'expo' ,
1970+ chooseTemplate : templateOverride || 'expo' ,
19731971 firstMessage : firstMessage ? { role : 'user' , content : firstMessage } : undefined , // Pass first message for title generation
19741972 } ) ,
19751973 } )
@@ -2055,7 +2053,7 @@ export function ProjectPageInternal({ opencodeEnabled = false }: { opencodeEnabl
20552053 sbxId : result . sandboxId ,
20562054 projectId : result . projectId ,
20572055 projectTitle : result . projectTitle ,
2058- template : EXPO_TESTING ? 'expo-testing' : ( project . template || 'react-native-expo' ) ,
2056+ template : templateOverride || project . template || 'react-native-expo' ,
20592057 recreated : result . recreated ,
20602058 } )
20612059
0 commit comments