Compare commits

..

No commits in common. "31b6476d149a9f1f5f61fde4adce020fa3d1f169" and "fc215f5f425ee47355d07e3fb413c38badf61208" have entirely different histories.

3 changed files with 23 additions and 58 deletions

View File

@ -4,7 +4,6 @@ import {
BackHandler, BackHandler,
Linking, Linking,
Platform, Platform,
Pressable,
ScrollView, ScrollView,
StyleSheet, StyleSheet,
Text, Text,
@ -14,7 +13,7 @@ import {
import { SafeAreaView } from "react-native-safe-area-context"; import { SafeAreaView } from "react-native-safe-area-context";
import { router, useFocusEffect, useLocalSearchParams } from "expo-router"; import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
import { Ionicons } from "@expo/vector-icons"; import { Ionicons } from "@expo/vector-icons";
import { moderateScale, scale, verticalScale } from "react-native-size-matters"; import { moderateScale, verticalScale } from "react-native-size-matters";
import Constants from "expo-constants"; import Constants from "expo-constants";
import { Colors } from "@/theme"; import { Colors } from "@/theme";
@ -167,22 +166,15 @@ export default function SubscriptionScreen() {
return ( return (
<SafeAreaView style={styles.safeArea} edges={["top", "bottom", "left", "right"]}> <SafeAreaView style={styles.safeArea} edges={["top", "bottom", "left", "right"]}>
<View style={styles.header}> <View style={styles.header}>
<Pressable <TouchableOpacity
onPress={handleBack} onPress={handleBack}
style={({ pressed }) => [ style={styles.backButton}
styles.backButton,
pressed && styles.backButtonPressed,
]}
hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }} hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
accessibilityRole="button" accessibilityRole="button"
accessibilityLabel="Go back" accessibilityLabel="Go back"
> >
<Ionicons <Ionicons name="chevron-back" size={24} color={Colors.textPrimary} />
name="chevron-back" </TouchableOpacity>
size={moderateScale(24)}
color={Colors.textPrimary}
/>
</Pressable>
<Text style={styles.headerTitle} numberOfLines={1}> <Text style={styles.headerTitle} numberOfLines={1}>
{title} {title}
</Text> </Text>
@ -245,15 +237,10 @@ const styles = StyleSheet.create({
backgroundColor: "#FFFFFF", backgroundColor: "#FFFFFF",
}, },
backButton: { backButton: {
width: scale(38), width: moderateScale(36),
height: scale(38), height: moderateScale(36),
borderRadius: scale(19),
justifyContent: "center",
alignItems: "center", alignItems: "center",
backgroundColor: "#F1F5F9", justifyContent: "center",
},
backButtonPressed: {
backgroundColor: "#E2E8F0",
}, },
headerTitle: { headerTitle: {
flex: 1, flex: 1,
@ -263,7 +250,7 @@ const styles = StyleSheet.create({
textAlign: "center", textAlign: "center",
marginHorizontal: moderateScale(8), marginHorizontal: moderateScale(8),
}, },
placeholder: { width: scale(38), height: scale(38) }, placeholder: { width: moderateScale(36) },
scrollContent: { scrollContent: {
flexGrow: 1, flexGrow: 1,
justifyContent: "center", justifyContent: "center",

View File

@ -2,7 +2,7 @@ import React, { type ReactNode, useCallback } from "react";
import { BackHandler, Platform, Pressable, StyleSheet, Text, View } from "react-native"; import { BackHandler, Platform, Pressable, StyleSheet, Text, View } from "react-native";
import { Ionicons } from "@expo/vector-icons"; import { Ionicons } from "@expo/vector-icons";
import { router, useFocusEffect } from "expo-router"; import { router, useFocusEffect } from "expo-router";
import { moderateScale, scale } from "react-native-size-matters"; import { moderateScale } from "react-native-size-matters";
import { Colors } from "@/theme"; import { Colors } from "@/theme";
@ -76,16 +76,16 @@ export function ContentPageHeader({
<Pressable <Pressable
accessibilityRole="button" accessibilityRole="button"
accessibilityLabel="Go back" accessibilityLabel="Go back"
hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }} hitSlop={10}
onPress={handleBack} onPress={handleBack}
style={({ pressed }) => [ style={({ pressed }) => [
styles.backButton, styles.iconButton,
pressed && styles.backButtonPressed, pressed && styles.pressed,
]} ]}
> >
<Ionicons <Ionicons
name="chevron-back" name="chevron-back"
size={moderateScale(24)} size={24}
color={Colors.textPrimary} color={Colors.textPrimary}
/> />
</Pressable> </Pressable>
@ -139,16 +139,12 @@ const styles = StyleSheet.create({
alignItems: "center", alignItems: "center",
justifyContent: "flex-end", justifyContent: "flex-end",
}, },
backButton: { iconButton: {
width: scale(38), width: 40,
height: scale(38), height: 40,
borderRadius: scale(19), borderRadius: 20,
justifyContent: "center",
alignItems: "center", alignItems: "center",
backgroundColor: "#F1F5F9", justifyContent: "center",
},
backButtonPressed: {
backgroundColor: "#E2E8F0",
}, },
pressed: { pressed: {
opacity: 0.65, opacity: 0.65,

View File

@ -3,7 +3,6 @@ import { Platform, Pressable, StyleSheet, Text, TextInput, View } from "react-na
import { SafeAreaView } from "react-native-safe-area-context"; import { SafeAreaView } from "react-native-safe-area-context";
import { Ionicons } from "@expo/vector-icons"; import { Ionicons } from "@expo/vector-icons";
import { router } from "expo-router"; import { router } from "expo-router";
import { moderateScale, scale } from "react-native-size-matters";
import { Colors } from "@/theme"; import { Colors } from "@/theme";
import { useDebouncedValue } from "@/features/content/hooks/use-debounced-value"; import { useDebouncedValue } from "@/features/content/hooks/use-debounced-value";
@ -151,18 +150,12 @@ export default function FacetedSearchScreen({
<SafeAreaView style={styles.safe} edges={["top", "left", "right"]}> <SafeAreaView style={styles.safe} edges={["top", "left", "right"]}>
<View style={styles.header}> <View style={styles.header}>
<Pressable <Pressable
accessibilityRole="button"
accessibilityLabel="Go back"
hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
onPress={() => router.back()} onPress={() => router.back()}
style={({ pressed }) => [ style={styles.headerButton}
styles.backButton,
pressed && styles.backButtonPressed,
]}
> >
<Ionicons <Ionicons
name="chevron-back" name="chevron-back"
size={moderateScale(24)} size={24}
color={Colors.textPrimary} color={Colors.textPrimary}
/> />
</Pressable> </Pressable>
@ -174,7 +167,7 @@ export default function FacetedSearchScreen({
</Text> </Text>
) : null} ) : null}
</View> </View>
<View style={styles.headerPlaceholder} /> <View style={styles.headerButton} />
</View> </View>
<View style={styles.controls}> <View style={styles.controls}>
@ -353,18 +346,7 @@ const styles = StyleSheet.create({
borderBottomColor: "#ECECEC", borderBottomColor: "#ECECEC",
backgroundColor: Colors.white, backgroundColor: Colors.white,
}, },
backButton: { headerButton: { width: 32, padding: 4 },
width: scale(38),
height: scale(38),
borderRadius: scale(19),
justifyContent: "center",
alignItems: "center",
backgroundColor: "#F1F5F9",
},
backButtonPressed: {
backgroundColor: "#E2E8F0",
},
headerPlaceholder: { width: scale(38), height: scale(38) },
headerCenter: { flex: 1, alignItems: "center" }, headerCenter: { flex: 1, alignItems: "center" },
headerTitle: { headerTitle: {
fontSize: 18, fontSize: 18,