docs: fix tsdocs following typedoc update + 1.20 release (#6033)

* docs: fix tsdocs following typedoc update + 1.20 release

* Fix OAS validation errors

* fixes to react-docs-generator

* fix content linting
This commit is contained in:
Shahed Nasser
2024-01-09 17:15:29 +02:00
committed by GitHub
parent 125879ada4
commit 18de90e603
32 changed files with 460 additions and 111 deletions
+11 -11
View File
@@ -412,7 +412,7 @@ import { useAdminProducts } from "medusa-react"
const Products = () => {
const { products, isLoading } = useAdminProducts({
expand: "collection"
expand: "collection",
})
return (
@@ -445,7 +445,7 @@ import { useAdminProducts } from "medusa-react"
const Products = () => {
const { products, isLoading } = useAdminProducts({
expand: "variants,collection"
expand: "variants,collection",
})
return (
@@ -478,7 +478,7 @@ import { useAdminProducts } from "medusa-react"
const Products = () => {
const { products, isLoading } = useAdminProducts({
expand: ""
expand: "",
})
return (
@@ -558,7 +558,7 @@ import { useAdminProducts } from "medusa-react"
const Products = () => {
const { products, isLoading } = useAdminProducts({
fields: "title",
expand: ""
expand: "",
})
return (
@@ -654,7 +654,7 @@ import { useAdminProducts } from "medusa-react"
const Products = () => {
const { products, isLoading } = useAdminProducts({
fields: "",
expand: ""
expand: "",
})
return (
@@ -698,10 +698,10 @@ const Products = () => {
products,
limit,
offset,
isLoading
isLoading,
} = useAdminProducts({
limit: 20,
offset: 0
offset: 0,
})
return (
@@ -736,14 +736,14 @@ For example, if the `count` is `100` and the `limit` is `50`, you can divide the
The `order` field, available on hooks supporting pagination, allows you to sort the retrieved items by an attribute of that item. For example, you can sort products by their `created_at` attribute by setting `order` to `created_at`:
```ts
```tsx
import React from "react"
import { useAdminProducts } from "medusa-react"
const Products = () => {
const {
products,
isLoading
isLoading,
} = useAdminProducts({
order: "created_at",
})
@@ -768,14 +768,14 @@ export default Products
By default, the sort direction will be ascending. To change it to descending, pass a dash (`-`) before the attribute name. For example:
```ts
```tsx
import React from "react"
import { useAdminProducts } from "medusa-react"
const Products = () => {
const {
products,
isLoading
isLoading,
} = useAdminProducts({
order: "-created_at",
})