From 733c1fd793de15e8659651f5b4f1a7087d4861e3 Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Sat, 22 Feb 2025 00:20:51 -0500 Subject: [PATCH] Share post text to be able to copy --- components/Post.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/components/Post.js b/components/Post.js index 1d90199..ee91a45 100644 --- a/components/Post.js +++ b/components/Post.js @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { Text, ScrollView, FlatList, StyleSheet, View, Share } from 'react-native'; +import { Text, Pressable, FlatList, StyleSheet, View, Share } from 'react-native'; import Hyperlink from 'react-native-hyperlink' import { Button, Card, Chip } from 'react-native-paper'; import API from './../API.js'; @@ -82,10 +82,17 @@ let Post = (props) => { {toProfileText} - - { - cleanContent - } + { + if(cleanContent.length > 10){ + Share.share({ + message: cleanContent + }); + } + }}> + { + cleanContent + } + :