From 1c8de53510f519d06d87295440e49d4b0be28eb1 Mon Sep 17 00:00:00 2001 From: Sadaqat Ali Date: Thu, 14 Apr 2022 09:32:15 +0500 Subject: [PATCH] added quick profile modal in leaderboard --- .../leaderboard/container/leaderboardContainer.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/components/leaderboard/container/leaderboardContainer.js b/src/components/leaderboard/container/leaderboardContainer.js index df4838faa..b4fb38a3c 100644 --- a/src/components/leaderboard/container/leaderboardContainer.js +++ b/src/components/leaderboard/container/leaderboardContainer.js @@ -12,6 +12,7 @@ import ROUTES from '../../../constants/routeNames'; // Component import LeaderboardView from '../view/leaderboardView'; +import { showProfileModal } from '../../../redux/actions/uiAction'; /* * Props Name Description Value @@ -39,14 +40,8 @@ class LeaderboardContainer extends PureComponent { } _handleOnUserPress = (username) => { - const { navigation } = this.props; - - navigation.navigate({ - routeName: ROUTES.SCREENS.PROFILE, - params: { - username, - }, - }); + const { dispatch } = this.props; + dispatch(showProfileModal(username)); }; _fetchLeaderBoard = async (selectedFilter, index) => {