()
| 71 | } |
| 72 | |
| 73 | export async function getStaticPaths () { |
| 74 | const inventory = await fetchInventory() |
| 75 | const paths = inventory.map(item => { |
| 76 | return { params: { name: slugify(item.name) }} |
| 77 | }) |
| 78 | return { |
| 79 | paths, |
| 80 | fallback: false |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | export async function getStaticProps ({ params }) { |
| 85 | const name = params.name.replace(/-/g," ") |
nothing calls this directly
no test coverage detected