refactor(actions): migrate viewall/search/unsubscribe to focused imports
This commit is contained in:
@@ -6,12 +6,10 @@ import Link from "next/link";
|
||||
import CookieBanner from "../../components/cookieBanner";
|
||||
import Footer from "../../components/footer";
|
||||
import Header from "../../components/header";
|
||||
import {
|
||||
hashAPIPath,
|
||||
getToken,
|
||||
azureHeaders,
|
||||
consoleLogger,
|
||||
} from "../../actions";
|
||||
import { hashAPIPath } from "../../actions/core/hash";
|
||||
import { getToken } from "../../actions/core/token";
|
||||
import { azureHeaders } from "../../actions/core/headers";
|
||||
import { consoleLogger } from "../../actions/core/logger";
|
||||
import axios from "axios";
|
||||
|
||||
const UnsubscribeCase = (props) => {
|
||||
@@ -118,8 +116,8 @@ const deleteWatchedCases = async (watchedCaseID) => {
|
||||
"Accept": "application/json",
|
||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||
"Authorization": "Bearer " + token.access_token,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
};
|
||||
|
||||
return axios(config)
|
||||
@@ -170,8 +168,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
//console.log(deleteCase);
|
||||
return {
|
||||
props: {
|
||||
caseRef: hasUnsubscribed ? searchResultsObj.value : null,
|
||||
},
|
||||
caseRef: hasUnsubscribed ? searchResultsObj.value : null
|
||||
}
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user