Skip to content

Commit

Permalink
update usecallback function
Browse files Browse the repository at this point in the history
  • Loading branch information
dukenv0307 committed Nov 10, 2023
1 parent e036746 commit 69368d3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/settings/Profile/CustomStatus/StatusPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,14 @@ function StatusPage({draftStatus, currentUserPersonalDetails}) {
User.clearDraftCustomStatus();
};

const topMostReportID = Navigation.getTopmostReportId();

const navigateBackToSettingsPage = useCallback(() => {
const topMostReportID = Navigation.getTopmostReportId();
if (topMostReportID) {
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(topMostReportID));
} else {
Navigation.goBack(ROUTES.SETTINGS_PROFILE, false, true);
}
}, [topMostReportID]);
}, []);

const updateStatus = useCallback(() => {
User.updateCustomStatus({text: defaultText, emojiCode: defaultEmoji});
Expand Down

0 comments on commit 69368d3

Please sign in to comment.