mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
Fix premium access check and tab bar styling
This commit is contained in:
1 parent
1e4974e2a0
commit
a531f43d91
4 files changed
+12
-11
No files matched your search
+1
-1
@@ -17,7 +17,7 @@ build/
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
apps/mobile/.env.prod
|
||||
apps/mobile/.env.*
|
||||
.secrets
|
||||
|
||||
|
||||
|
||||
@@ -43,11 +43,14 @@ function TabBarBackground() {
|
||||
// The solid rgba background in tabBarStyle provides the visual effect on Android
|
||||
if (Platform.OS === 'ios') {
|
||||
return (
|
||||
<>
|
||||
<BlurView
|
||||
intensity={100}
|
||||
intensity={80}
|
||||
tint="dark"
|
||||
style={StyleSheet.absoluteFill}
|
||||
/>
|
||||
<View style={[StyleSheet.absoluteFill, { backgroundColor: 'rgba(14, 14, 17, 0.85)' }]} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
@@ -435,7 +438,7 @@ export default function AppLayout() {
|
||||
tabBarBackground: () => <TabBarBackground />,
|
||||
tabBarStyle: shouldHideTabBar ? { display: 'none' } : {
|
||||
position: 'absolute',
|
||||
backgroundColor: 'rgba(13, 13, 26, 0.92)',
|
||||
backgroundColor: 'rgba(14, 14, 17, 0.85)',
|
||||
borderTopColor: 'rgba(233, 69, 96, 0.2)', // primary brand color
|
||||
borderTopWidth: 1,
|
||||
paddingTop: 8,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useFocusEffect } from 'expo-router';
|
||||
import Animated, { FadeInDown } from 'react-native-reanimated';
|
||||
import { Ionicons } from '@expo/vector-icons';
|
||||
import { BlurView } from 'expo-blur';
|
||||
import { useAuthStore, usePacksStore } from '../../src/store';
|
||||
import { useAuthStore, usePacksStore, useSubscriptionStore } from '../../src/store';
|
||||
import { GradientBackground } from '../../src/components/ui';
|
||||
import { Paywall } from '../../src/components/paywall';
|
||||
import { CompactHeader, ContentRow } from '../../src/components/discovery';
|
||||
@@ -68,11 +68,13 @@ function groupPacksByCategory(
|
||||
export default function DiscoveryScreen() {
|
||||
const { user, partner, couple } = useAuthStore();
|
||||
const { packs, categories, fetchPacks, getPackProgress } = usePacksStore();
|
||||
const { subscription } = useSubscriptionStore();
|
||||
const { width } = useWindowDimensions();
|
||||
const [showPaywall, setShowPaywall] = useState(false);
|
||||
const [headerHeight, setHeaderHeight] = useState(130);
|
||||
|
||||
const isPremiumUser = user?.is_premium ?? false;
|
||||
// Check all sources of premium access: user flag, partner flag, or active subscription
|
||||
const isPremiumUser = user?.is_premium || partner?.is_premium || subscription.isProUser;
|
||||
const isWideScreen = width > MAX_CONTENT_WIDTH;
|
||||
|
||||
// Refresh data when screen gains focus
|
||||
|
||||
@@ -1267,8 +1267,6 @@ export default function SwipeScreen() {
|
||||
</Animated.View>
|
||||
</View>
|
||||
</View>
|
||||
{/* Spacer to balance header when back button is shown */}
|
||||
{(packId || mode === 'pending') && <View style={styles.headerSpacer} />}
|
||||
</View>
|
||||
</Animated.View>
|
||||
|
||||
@@ -1370,11 +1368,9 @@ const styles = StyleSheet.create({
|
||||
justifyContent: 'center',
|
||||
},
|
||||
backButton: {
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
padding: spacing.sm,
|
||||
marginRight: spacing.sm,
|
||||
},
|
||||
headerSpacer: {
|
||||
width: 40, // Match back button width for centering
|
||||
},
|
||||
progressContainer: {
|
||||
alignItems: "center",
|
||||
|
||||
Reference in new issue
Block a user