Working view of a LocalProvider

This commit is contained in:
Bel Curcio
2021-06-11 13:50:37 -03:00
parent 6de60ce29c
commit 4784daad80
5 changed files with 213 additions and 11 deletions

View File

@@ -1,3 +1,5 @@
import data from '../../data.json'
export type GetAllProductPathsResult = {
products: Array<{ path: string }>
}
@@ -5,7 +7,7 @@ export type GetAllProductPathsResult = {
export default function getAllProductPathsOperation() {
function getAllProductPaths(): Promise<GetAllProductPathsResult> {
return Promise.resolve({
products: [].map((p) => ({ path: `/hello` })),
products: data.products.map(({ path }) => ({ path })),
})
}