import React, { useState } from 'react'; import { View, Text, ScrollView, Pressable, StyleSheet, SafeAreaView } from 'react-native'; const POSTS = [ { id: 1, who: 'Aria', av: '🦋', when: '2h', text: 'Shipped my first app this weekend. Tiny, but it is live and I am proud!', likes: 42, replies: 8 }, { id: 2, who: 'Ken', av: '🐢', when: '5h', text: 'What is everyone reading lately? Looking for something on focus.', likes: 17, replies: 23 }, { id: 3, who: 'Mira', av: '🌙', when: '1d', text: 'Friendly reminder to drink water and take a walk today. 💚', likes: 88, replies: 5 }, ]; export default function App() { const [liked, setLiked] = useState>({}); return ( Makers Circle🙂 {POSTS.map((p) => { const on = liked[p.id]; return ( {p.av} {p.who}{p.when} ago {p.text} setLiked((l) => ({ ...l, [p.id]: !l[p.id] }))} style={s.action}> {on ? '♥' : '♡'} {p.likes + (on ? 1 : 0)} 💬{p.replies} ); })} ); } const s = StyleSheet.create({ safe: { flex: 1, backgroundColor: '#0C0A12' }, head: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', paddingTop: 58, paddingHorizontal: 22, paddingBottom: 12 }, h1: { color: '#fff', fontSize: 26, fontWeight: '800' }, avatarMe: { width: 38, height: 38, borderRadius: 19, backgroundColor: '#1A1626', alignItems: 'center', justifyContent: 'center' }, scroll: { padding: 18 }, card: { backgroundColor: '#15111E', borderRadius: 20, padding: 18, marginBottom: 14 }, cardHead: { flexDirection: 'row', alignItems: 'center', marginBottom: 12 }, av: { width: 42, height: 42, borderRadius: 21, backgroundColor: '#211A33', alignItems: 'center', justifyContent: 'center', marginRight: 12 }, who: { color: '#fff', fontSize: 16, fontWeight: '700' }, when: { color: '#7A6E96', fontSize: 13, marginTop: 2 }, text: { color: '#DAD2EC', fontSize: 16, lineHeight: 23 }, actions: { flexDirection: 'row', gap: 26, marginTop: 16 }, action: { flexDirection: 'row', alignItems: 'center', gap: 7 }, actionIcon: { color: '#9A8CC0', fontSize: 18 }, actionText: { color: '#9A8CC0', fontSize: 14, fontWeight: '600' }, });