Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions app/(tabs)/media/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,19 @@ const FeedVideoItem = memo(function FeedVideoItem({
</Text>
)}

{/* Spot chip */}
{post.spot && (
<Pressable
style={styles.spotChip}
onPress={() => router.push(`/(tabs)/spots/${post.spot?._id}`)}
>
<Ionicons name="location" size={14} color={YELLOW} />
<Text style={styles.spotChipText} numberOfLines={1}>
{post.spot.name}
</Text>
</Pressable>
)}

{/* Tags */}
{post.sportTypes && post.sportTypes.length > 0 && (
<View style={styles.videoTags}>
Expand Down Expand Up @@ -1379,4 +1392,24 @@ const styles = StyleSheet.create({
color: 'rgba(255,255,255,0.7)',
fontSize: 12,
},
spotChip: {
flexDirection: 'row',
alignItems: 'center',
alignSelf: 'flex-start',
gap: 4,
maxWidth: '100%',
backgroundColor: 'rgba(0,0,0,0.4)',
borderWidth: 1,
borderColor: `${YELLOW}80`,
paddingHorizontal: 10,
paddingVertical: 5,
borderRadius: 16,
marginBottom: 8,
},
spotChipText: {
color: '#fff',
fontSize: 13,
fontWeight: '600',
flexShrink: 1,
},
});
48 changes: 48 additions & 0 deletions app/(tabs)/media/post/[postId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,29 @@ export default function PostDetailScreen() {
</View>
)}

{/* Spot chip */}
{post.spot && (
<View style={styles.spotSection}>
<Pressable
style={[styles.spotChip, { backgroundColor: theme.surface }]}
onPress={() => router.push(`/(tabs)/spots/${post.spot?._id}`)}
>
<Ionicons name="location" size={16} color={colors.primary} />
<Text style={[styles.spotChipText, { color: theme.text }]} numberOfLines={1}>
{post.spot.name}
</Text>
{(post.spot.city || post.spot.state) && (
<Text
style={[styles.spotChipMeta, { color: theme.textSecondary }]}
numberOfLines={1}
>
{[post.spot.city, post.spot.state].filter(Boolean).join(', ')}
</Text>
)}
</Pressable>
</View>
)}

{/* Comments Section */}
<View style={[styles.commentsSection, { borderTopColor: theme.border }]}>
<Text style={[styles.commentsSectionTitle, { color: theme.text }]}>
Expand Down Expand Up @@ -565,6 +588,31 @@ const styles = StyleSheet.create({
fontSize: 15,
lineHeight: 22,
},
spotSection: {
paddingHorizontal: 20,
paddingBottom: 16,
},
spotChip: {
flexDirection: 'row',
alignItems: 'center',
alignSelf: 'flex-start',
maxWidth: '100%',
gap: 6,
paddingHorizontal: 12,
paddingVertical: 8,
borderRadius: 20,
borderWidth: 1,
borderColor: `${YELLOW}60`,
},
spotChipText: {
fontSize: 14,
fontWeight: '600',
flexShrink: 1,
},
spotChipMeta: {
fontSize: 13,
flexShrink: 1,
},
commentsSection: {
paddingHorizontal: 20,
paddingTop: 16,
Expand Down
Loading
Loading