Skip to content

Commit

Permalink
Share experiments data (#7)
Browse files Browse the repository at this point in the history
* create experiments api

* add missing types

* add try catch

* Revert "add try catch"

This reverts commit 124964b.

* add try catch

* add experimental nftTracing: true

* Revert "add experimental nftTracing: true"

This reverts commit 6d9cd58.

* simplify approach

* add missing slash
  • Loading branch information
ignmandagaran committed Jun 16, 2022
1 parent aeeffdd commit 337ecdb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const HomePage = ({
}

export const getStaticProps: GetStaticProps = async () => {
const fs = await import('fs')
const allSlugs = await getAllExperimentSlugs()

const modules = await Promise.all(
Expand Down Expand Up @@ -69,6 +70,11 @@ export const getStaticProps: GetStaticProps = async () => {
})
)

fs.writeFileSync(
process.cwd() + '/public/experiments.json',
JSON.stringify(experiments, null, 2)
)

return {
props: {
experiments: experiments
Expand Down

1 comment on commit 337ecdb

@vercel
Copy link

@vercel vercel bot commented on 337ecdb Jun 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.