refactor phase 3a pages-admin targeted actions imports
This commit is contained in:
@@ -13,13 +13,13 @@ import AppealsTab from "../../components/admin/tabs/appeals";
|
|||||||
import DocumentsTab from "../../components/admin/tabs/documents";
|
import DocumentsTab from "../../components/admin/tabs/documents";
|
||||||
|
|
||||||
import { fetchAdminStorageData } from "../../components/admin/utils/serverside";
|
import { fetchAdminStorageData } from "../../components/admin/utils/serverside";
|
||||||
import { getNewAppeals } from "../../actions";
|
import { getNewAppeals } from "../../actions/services/adminService";
|
||||||
|
|
||||||
import { getSearchDetails } from "../../components/utils";
|
import { getSearchDetails } from "../../components/utils";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
setSearchDetails,
|
setSearchDetails,
|
||||||
setSearchResults,
|
setSearchResults
|
||||||
} from "../../store/searchOutput/action";
|
} from "../../store/searchOutput/action";
|
||||||
import { setCurrentPage } from "../../store/currentView/action";
|
import { setCurrentPage } from "../../store/currentView/action";
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ const StoragePage = (props) => {
|
|||||||
repCompleteCount,
|
repCompleteCount,
|
||||||
searchResultsObj,
|
searchResultsObj,
|
||||||
docsOffline,
|
docsOffline,
|
||||||
showFilteredDocs,
|
showFilteredDocs
|
||||||
} = props;
|
} = props;
|
||||||
const [whichTab, setWhichTab] = useState("documents");
|
const [whichTab, setWhichTab] = useState("documents");
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ const StoragePage = (props) => {
|
|||||||
"documents",
|
"documents",
|
||||||
"appeals",
|
"appeals",
|
||||||
"storage",
|
"storage",
|
||||||
"accounts",
|
"accounts"
|
||||||
].map((tab) => (
|
].map((tab) => (
|
||||||
<li
|
<li
|
||||||
key={tab}
|
key={tab}
|
||||||
@@ -168,7 +168,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
|
|
||||||
if (![...ALLOWED_IPS, ...LOCALHOST_IPS].includes(ip)) {
|
if (![...ALLOWED_IPS, ...LOCALHOST_IPS].includes(ip)) {
|
||||||
return {
|
return {
|
||||||
redirect: { destination: "/403", permanent: false },
|
redirect: { destination: "/403", permanent: false }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,8 +192,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
userData,
|
userData,
|
||||||
repCompleteCount,
|
repCompleteCount,
|
||||||
docsOffline: process.env.DOCAPI_OFFLINE || false,
|
docsOffline: process.env.DOCAPI_OFFLINE || false,
|
||||||
showFilteredDocs: process.env.SHOWFILTERDOCS || false,
|
showFilteredDocs: process.env.SHOWFILTERDOCS || false
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -202,14 +202,14 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
return {
|
return {
|
||||||
setCurrentPage: (currentPage) => {
|
setCurrentPage: (currentPage) => {
|
||||||
dispatch(setCurrentPage(currentPage));
|
dispatch(setCurrentPage(currentPage));
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = (state) => {
|
const mapStateToProps = (state) => {
|
||||||
console.log("===============================\n state:", state);
|
console.log("===============================\n state:", state);
|
||||||
return {
|
return {
|
||||||
searchResultsObj: state.searchResultsObj,
|
searchResultsObj: state.searchResultsObj
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user