Skip to content

Commit

Permalink
Use props.network instead of useNetwork
Browse files Browse the repository at this point in the history
  • Loading branch information
paultsimura committed Nov 7, 2023
1 parent bbf2217 commit 7727150
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pages/home/report/ReportActionsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import withLocalize, {withLocalizePropTypes} from '@components/withLocalize';
import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions';
import useCopySelectionHelper from '@hooks/useCopySelectionHelper';
import useInitialValue from '@hooks/useInitialValue';
import useNetwork from '@hooks/useNetwork';
import usePrevious from '@hooks/usePrevious';
import compose from '@libs/compose';
import getIsReportFullyVisible from '@libs/getIsReportFullyVisible';
Expand Down Expand Up @@ -95,7 +94,6 @@ function ReportActionsView(props) {

const prevIsSmallScreenWidthRef = useRef(props.isSmallScreenWidth);

const {isOffline} = useNetwork();
const isFocused = useIsFocused();
const reportID = props.report.reportID;

Expand Down Expand Up @@ -180,7 +178,7 @@ function ReportActionsView(props) {
*/
const loadOlderChats = () => {
// Only fetch more if we are neither already fetching (so that we don't initiate duplicate requests) nor offline.
if (isOffline || props.isLoadingOlderReportActions) {
if (props.network.isOffline || props.isLoadingOlderReportActions) {
return;
}

Expand Down

0 comments on commit 7727150

Please sign in to comment.