Skip to content

Commit 25bf84a

Browse files
fix(mobile): center the Choose project empty-state buttons (#27450)
1 parent e455200 commit 25bf84a

1 file changed

Lines changed: 26 additions & 18 deletions

File tree

‎apps/mobile/src/features/threads/NewTaskRouteScreen.tsx‎

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -402,21 +402,27 @@ export function NewTaskRouteScreen({ route }: StaticScreenProps<NewTaskRoutePara
402402
</Text>
403403
{Platform.OS === "android" ? (
404404
<>
405-
<Button
406-
label={catalogState.hasReadyEnvironment ? "Add new project" : "Add environment"}
407-
tone="primary"
408-
onPress={() =>
409-
catalogState.hasReadyEnvironment
410-
? navigation.dispatch(StackActions.push("AddProject"))
411-
: navigation.navigate("ConnectionsNew")
412-
}
413-
/>
414-
{canStartScratch ? (
405+
<View>
415406
<Button
416-
label="Start without a project"
417-
tone="secondary"
418-
onPress={() => void startScratch()}
407+
label={
408+
catalogState.hasReadyEnvironment ? "Add new project" : "Add environment"
409+
}
410+
tone="primary"
411+
onPress={() =>
412+
catalogState.hasReadyEnvironment
413+
? navigation.dispatch(StackActions.push("AddProject"))
414+
: navigation.navigate("ConnectionsNew")
415+
}
419416
/>
417+
</View>
418+
{canStartScratch ? (
419+
<View>
420+
<Button
421+
label="Start without a project"
422+
tone="secondary"
423+
onPress={() => void startScratch()}
424+
/>
425+
</View>
420426
) : null}
421427
</>
422428
) : !catalogState.hasReadyEnvironment ? (
@@ -437,11 +443,13 @@ export function NewTaskRouteScreen({ route }: StaticScreenProps<NewTaskRoutePara
437443
/>
438444
</View>
439445
{canStartScratch ? (
440-
<Button
441-
label="Start without a project"
442-
tone="secondary"
443-
onPress={() => void startScratch()}
444-
/>
446+
<View>
447+
<Button
448+
label="Start without a project"
449+
tone="secondary"
450+
onPress={() => void startScratch()}
451+
/>
452+
</View>
445453
) : null}
446454
</>
447455
)}

0 commit comments

Comments
 (0)