Думаю, вам не нужно использовать useEffect
import React, { useEffect } from "react";
import { connect, useSelector } from "react-redux";
import SoloVideoPage from "./SoloVideoPage";
import Loading from "./Loading";
function VideoProgress({ isLoading, location }) {
if (isLoading && location === 0) {
return <Loading />;
}
return <SoloVideoPage />;
}
const mapStateToProps = (state) => ({
isLoading: state.postVideo.isLoading,
location: state.postVideo.location,
});
export default connect(mapStateToProps, null)(VideoProgress);