-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NextJS] Move LayoutService to sitecore-jss package #511
Conversation
import { HttpJsonFetcher } from './httpClientInterface'; | ||
import { IncomingMessage, ServerResponse } from 'http'; | ||
|
||
export type DataFetcherResolver = (req?: IncomingMessage, res?: ServerResponse) => HttpJsonFetcher<LayoutServiceData>; | ||
export type DataFetcherResolver<T> = (req?: IncomingMessage, res?: ServerResponse) => HttpJsonFetcher<T>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we could make an exception and use any
here to avoid having 2 DataFetcherResolvers on the LayoutServiceInstanceConfig
.
export type DataFetcherResolver<T> = (req?: IncomingMessage, res?: ServerResponse) => HttpJsonFetcher<T>; | |
export type DataFetcherResolver = (req?: IncomingMessage, res?: ServerResponse) => HttpJsonFetcher<any>; |
fetchPlaceholderData( | ||
placeholderName: string, | ||
itemPath: string, | ||
req?: IncomingMessage, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add language?: string,
as 3rd parameter and pass it to getFetchOptions()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, will add
Description
Motivation
How Has This Been Tested?
Types of changes
/docs
directory)Checklist: