-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): Updated API Reference (#6041)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Co-authored-by: Oli Juhl <[email protected]> Co-authored-by: Shahed Nasser <[email protected]>
- Loading branch information
1 parent
a9b4214
commit bc58bc8
Showing
12 changed files
with
254 additions
and
27 deletions.
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
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
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
44 changes: 22 additions & 22 deletions
44
www/apps/api-reference/specs/store/code_samples/tsx/store_products/getundefined
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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
import React from "react" | ||
import { useProducts } from "medusa-react" | ||
function Product () { | ||
const { products, isLoading } = useProducts() | ||
return ( | ||
<div> | ||
{isLoading && <span>Loading...</span>} | ||
{products && !products.length && <span>No Products</span>} | ||
{products && products.length > 0 && ( | ||
<ul> | ||
{products.map((product) => ( | ||
<li key={product.id}>{product.title}</li> | ||
))} | ||
</ul> | ||
)} | ||
</div> | ||
) | ||
} | ||
export default Products | ||
import React from "react" | ||
import { useProducts } from "medusa-react" | ||
|
||
const Products = () => { | ||
const { products, isLoading } = useProducts() | ||
|
||
return ( | ||
<div> | ||
{isLoading && <span>Loading...</span>} | ||
{products && !products.length && <span>No Products</span>} | ||
{products && products.length > 0 && ( | ||
<ul> | ||
{products.map((product) => ( | ||
<li key={product.id}>{product.title}</li> | ||
))} | ||
</ul> | ||
)} | ||
</div> | ||
) | ||
} | ||
|
||
export default 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
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
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
Oops, something went wrong.
bc58bc8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
docs-ui – ./www/apps/ui
docs-ui-medusajs.vercel.app
docs-ui-git-develop-medusajs.vercel.app
docs-ui.vercel.app
bc58bc8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
medusa-dashboard – ./packages/admin-next/dashboard
medusa-dashboard.vercel.app
admin-preview.medusajs.com
medusa-dashboard-git-develop-medusajs.vercel.app
medusa-dashboard-medusajs.vercel.app
bc58bc8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
api-reference – ./www/apps/api-reference
api-reference-medusajs.vercel.app
api-reference-git-develop-medusajs.vercel.app
api-reference-delta.vercel.app
docs.medusajs.com
bc58bc8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
medusa-docs – ./www/apps/docs
medusa-docs.vercel.app
medusa-docs-medusajs.vercel.app
medusa-docs-git-develop-medusajs.vercel.app