-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from felipeptcho/fix-skipped-files
Fix skipped api-something pages
- Loading branch information
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export async function getServerSideProps() { | ||
const products = [ | ||
{ | ||
name: 'Hat', | ||
publishedAt: new Date(0), | ||
}, | ||
]; | ||
return { | ||
props: { | ||
products, | ||
}, | ||
}; | ||
} | ||
|
||
export default function Page({ products }) { | ||
return JSON.stringify(products); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { withSuperJSONPage as _withSuperJSONPage } from 'babel-plugin-superjson-next/tools'; | ||
import { withSuperJSONProps as _withSuperJSONProps } from 'babel-plugin-superjson-next/tools'; | ||
export const getServerSideProps = _withSuperJSONProps( | ||
async function getServerSideProps() { | ||
const products = [ | ||
{ | ||
name: 'Hat', | ||
publishedAt: new Date(0), | ||
}, | ||
]; | ||
return { | ||
props: { | ||
products, | ||
}, | ||
}; | ||
}, | ||
['smth'] | ||
); | ||
|
||
function Page({ products }) { | ||
return JSON.stringify(products); | ||
} | ||
|
||
export default _withSuperJSONPage(Page); |