style: specify source of apollo state interface
Signed-off-by: Dmytro Stanchiev <git@dmytros.dev>
This commit is contained in:
@@ -5,7 +5,7 @@ type SearchListing = {
|
|||||||
listingLink: string;
|
listingLink: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
interface ApolloState {
|
interface ApolloSearchState {
|
||||||
[key: string]: {
|
[key: string]: {
|
||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
url: string;
|
url: string;
|
||||||
@@ -33,7 +33,8 @@ function extractSearchListingsFromNextData(htmlString: string) {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const jsonData = JSON.parse(nextData.textContent);
|
const jsonData = JSON.parse(nextData.textContent);
|
||||||
const apolloState: ApolloState = jsonData.props.pageProps.__APOLLO_STATE__;
|
const apolloState: ApolloSearchState =
|
||||||
|
jsonData.props.pageProps.__APOLLO_STATE__;
|
||||||
|
|
||||||
const listingsKeys: string[] = [];
|
const listingsKeys: string[] = [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user