added garys api endpoint
This commit is contained in:
@@ -18,6 +18,7 @@ import { setMyRepresentations } from "../../store/myRepresentations/action";
|
||||
import { setWatchedCases } from "../../store/watchedCases/action";
|
||||
import { setAwaitingSubmission } from "../../store/awaitingSubmission/action";
|
||||
import {
|
||||
getToken,
|
||||
getMyCases,
|
||||
getMyRepresentations,
|
||||
getWatchedCases,
|
||||
@@ -75,6 +76,9 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
"public, s-maxage=604800, stale-while-revalidate"
|
||||
);
|
||||
|
||||
const token = await getToken();
|
||||
console.log(token);
|
||||
|
||||
const [
|
||||
myCases,
|
||||
myRepresentations,
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
setSearchResults,
|
||||
getSearchResultsObj,
|
||||
} from "../store/searchOutput/action";
|
||||
import { getBasicSearch } from "../actions";
|
||||
import { getToken, getBasicSearch } from "../actions";
|
||||
|
||||
const Home = (props) => {
|
||||
const { footerLinks, pages } = props;
|
||||
@@ -56,6 +56,8 @@ const Home = (props) => {
|
||||
export const getServerSideProps = wrapper.getServerSideProps(
|
||||
(store) =>
|
||||
async ({ query, req, res }) => {
|
||||
const token = await getToken();
|
||||
console.log(token);
|
||||
console.log("query-", query);
|
||||
const searchResultsObj = (await getBasicSearch(query.q)) || null;
|
||||
store.dispatch(setSearchResults(searchResultsObj));
|
||||
|
||||
Reference in New Issue
Block a user