diff --git a/src/components/FeedPost.tsx b/src/components/FeedPost.tsx index 1508ced..4a76a72 100644 --- a/src/components/FeedPost.tsx +++ b/src/components/FeedPost.tsx @@ -8,62 +8,74 @@ import { useRouter } from "expo-router"; const styles = StyleSheet.create({ postHeader: { - backgroundColor: '#434343', - borderTopRightRadius: 5, - borderTopLeftRadius: 5, - padding: 10, - paddingHorizontal: 15, - margin: 0, - display: 'flex', - flexDirection: 'row', - alignItems: 'center', - gap: 10 + backgroundColor: "#434343", + borderTopRightRadius: 5, + borderTopLeftRadius: 5, + padding: 10, + paddingHorizontal: 15, + margin: 0, + display: "flex", + flexDirection: "row", + alignItems: "center", + gap: 10, }, postHeaderHovered: { - backgroundColor: '#5a5a5a' + backgroundColor: "#5a5a5a", }, postBody: { - backgroundColor: '#434343', - padding: 10, - paddingHorizontal: 15, - margin: 0, - gap: 10, + backgroundColor: "#434343", + padding: 10, + paddingHorizontal: 15, + margin: 0, + gap: 10, - borderTopWidth: 1, - borderBottomWidth: 1, - borderColor: '#313131' - } -}) + borderTopWidth: 1, + borderBottomWidth: 1, + borderColor: "#313131", + }, +}); function PostHeader({ profile }: { profile: Profile }) { - const [hovered, setHovered] = useState(false) - - const router = useRouter() + const [hovered, setHovered] = useState(false); + + const router = useRouter(); const onPress = () => { // TODO: This should go to the post, not the author's page - router.navigate(`/blog/${profile.handle}`) - } + router.navigate(`/blog/${profile.handle}`); + }; - return setHovered(true)} - onHoverOut={() => setHovered(false)} - onPress={onPress}> - - {profile.handle} - + return ( + setHovered(true)} + onHoverOut={() => setHovered(false)} + onPress={onPress} + > + + {profile.handle} + + ); } -function PostBody({ post } : { post: Post }) { - return (post.text !== '') && - {post.text} - +function PostBody({ post }: { post: Post }) { + return ( + post.text !== "" && ( + + {post.text} + + ) + ); } export default function FeedPost({ post }: { post: Post }) { - return - - - + return ( + + + + + ); }