Skip to content

Commit 1f09476

Browse files
committed
Back btn
1 parent e667a7d commit 1f09476

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

mobile/app/game/[id].tsx

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -494,16 +494,23 @@ export default function GameScreen() {
494494
</SafeAreaView>
495495
)}
496496

497-
{/* Close button - top left */}
498-
<SafeAreaView style={[styles.closeButtonContainer, { paddingLeft: Math.max(insets.left, spacing.lg) }]} edges={['top']} pointerEvents="box-none">
497+
{/* Back button - top left (matches web navbar red back button) */}
498+
<SafeAreaView style={[styles.backButtonContainer, { paddingLeft: Math.max(insets.left, spacing.lg) }]} edges={['top']} pointerEvents="box-none">
499499
<Pressable
500500
style={({ pressed }) => [
501-
styles.closeButton,
502-
pressed && { opacity: 0.7 },
501+
styles.backButton,
502+
pressed && { opacity: 0.85, transform: [{ scale: 0.95 }] },
503503
]}
504504
onPress={handleQuit}
505505
>
506-
<Ionicons name="close" size={24} color={colors.white} />
506+
<LinearGradient
507+
colors={['rgba(156,82,39,0.9)', 'rgba(91,29,29,0.9)', 'rgba(255,112,112,0.9)']}
508+
start={{ x: 0, y: 0 }}
509+
end={{ x: 1, y: 1 }}
510+
style={styles.backButtonGradient}
511+
>
512+
<Ionicons name="arrow-back" size={22} color={colors.white} />
513+
</LinearGradient>
507514
</Pressable>
508515
</SafeAreaView>
509516

@@ -786,22 +793,27 @@ const styles = StyleSheet.create({
786793
fontSize: fontSizes.xs,
787794
},
788795

789-
// ── Close button (top left) ──────────────────────────────
790-
closeButtonContainer: {
796+
// ── Back button (top left) — matches web red navbar back btn ──
797+
backButtonContainer: {
791798
position: 'absolute',
792799
top: 0,
793800
left: 0,
794801
zIndex: 102,
795802
paddingLeft: spacing.lg,
796803
paddingTop: spacing.sm,
797804
},
798-
closeButton: {
799-
width: 40,
800-
height: 40,
801-
borderRadius: 20,
802-
backgroundColor: 'rgba(0, 0, 0, 0.5)',
805+
backButton: {
806+
borderRadius: 12,
807+
overflow: 'hidden',
808+
},
809+
backButtonGradient: {
810+
width: 44,
811+
height: 44,
812+
borderRadius: 12,
803813
justifyContent: 'center',
804814
alignItems: 'center',
815+
borderWidth: 1.4,
816+
borderColor: '#85200c',
805817
},
806818

807819
// ── Map overlay - slides up from bottom ──────────────────

0 commit comments

Comments
 (0)