aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/profile/Friends.tsx1
-rw-r--r--src/screens/profile/InviteFriendsScreen.tsx16
2 files changed, 10 insertions, 7 deletions
diff --git a/src/components/profile/Friends.tsx b/src/components/profile/Friends.tsx
index 51ba6c64..cf354e06 100644
--- a/src/components/profile/Friends.tsx
+++ b/src/components/profile/Friends.tsx
@@ -63,7 +63,6 @@ const Friends: React.FC<FriendsProps> = ({result, screenType, userId}) => {
<TouchableOpacity
style={styles.addFriendButton}
onPress={() => {
- console.log('screentype: ', screenType);
handleAddFriend(screenType, profilePreview, dispatch, state).then(
(success) => {
if (success) {
diff --git a/src/screens/profile/InviteFriendsScreen.tsx b/src/screens/profile/InviteFriendsScreen.tsx
index d1142b7f..36aa8ada 100644
--- a/src/screens/profile/InviteFriendsScreen.tsx
+++ b/src/screens/profile/InviteFriendsScreen.tsx
@@ -31,15 +31,21 @@ import Animated from 'react-native-reanimated';
import Icon from 'react-native-vector-icons/Feather';
import {InviteFriendTile} from '../../components/friends';
import {TAGG_LIGHT_BLUE} from '../../constants';
+import {MainStackParams} from '../../routes';
+import {RouteProp} from '@react-navigation/native';
const AnimatedIcon = Animated.createAnimatedComponent(Icon);
+type InviteFriendsScreenRouteProp = RouteProp<
+ MainStackParams,
+ 'InviteFriendsScreen'
+>;
+
interface InviteFriendsScreenProps {
- screenType: ScreenType;
+ route: InviteFriendsScreenRouteProp;
}
-const InviteFriendsScreen: React.FC<InviteFriendsScreenProps> = ({
- screenType,
-}) => {
+const InviteFriendsScreen: React.FC<InviteFriendsScreenProps> = ({route}) => {
+ const {screenType} = route.params;
const dispatch = useDispatch();
const state = useStore().getState();
const [usersFromContacts, setUsersFromContacts] = useState<
@@ -64,7 +70,6 @@ const InviteFriendsScreen: React.FC<InviteFriendsScreenProps> = ({
let response = await usersFromContactsService(retrievedContacts);
await setUsersFromContacts(response.existing_tagg_users);
await setNonUsersFromContacts(response.invite_from_contacts);
- usersFromContacts.map((user) => console.log('user: ', user.username));
setResults({
usersFromContacts: response.existing_tagg_users,
nonUsersFromContacts: response.invite_from_contacts,
@@ -81,7 +86,6 @@ const InviteFriendsScreen: React.FC<InviteFriendsScreenProps> = ({
* Main handler for changes in query.
*/
useEffect(() => {
- console.log('query is now ', query);
const search = async () => {
if (query.length > 0) {
const searchResultsUsers = usersFromContacts.filter(