Skip to content

Commit

Permalink
feat(after): Update render.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
nimaa77 committed Jul 11, 2020
1 parent 668fee6 commit 0592897
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/after.js/src/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface AfterRenderOptions<T> {
document?: typeof DefaultDoc;
chunks: Chunks;
scrollToTop?: boolean;
ssg?: boolean;
customRenderer?: (
element: React.ReactElement<T>
) => { html: string } | Promise<{ html: string }>;
Expand All @@ -48,6 +49,7 @@ export async function render<T>(options: AfterRenderOptions<T>) {
customRenderer,
chunks,
scrollToTop = true,
ssg = false,
...rest
} = options;
const Doc = Document || DefaultDoc;
Expand Down Expand Up @@ -94,6 +96,7 @@ export async function render<T>(options: AfterRenderOptions<T>) {
const { scripts, styles } = getAssets({ route: match, chunks });
const afterData: AfterClientData = {
scrollToTop: autoScrollRef,
ssg,
};

const data = {
Expand Down

0 comments on commit 0592897

Please sign in to comment.