fix: adds order by functionality to products (#1021)

* fix: adds order by functionality to products

* feat: adds product tags list

* fix: adds client and react support for product tags

* fix: unit test

* Update packages/medusa/src/services/product-tag.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/medusa/src/services/product-tag.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/medusa/src/services/product-tag.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/medusa/src/services/product-tag.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/medusa/src/services/product-tag.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/medusa/src/services/product-tag.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Sebastian Rindom
2022-02-03 19:03:15 +01:00
committed by GitHub
co-authored by Oliver Windall Juhl
parent a81227fa74
commit 3bf32e5dc9
17 changed files with 498 additions and 13 deletions
@@ -1,7 +1,7 @@
import {
useAdminProduct,
useAdminProducts,
useAdminProductTags,
useAdminProductTagUsage,
useAdminProductTypes,
} from "../../../../src"
import { renderHook } from "@testing-library/react-hooks"
@@ -36,10 +36,10 @@ describe("useAdminProductTypes hook", () => {
})
})
describe("useAdminProductTags hook", () => {
describe("useAdminProductTagUsage hook", () => {
test("returns a list of product tags", async () => {
const tags = fixtures.list("product_tag")
const { result, waitFor } = renderHook(() => useAdminProductTags(), {
const { result, waitFor } = renderHook(() => useAdminProductTagUsage(), {
wrapper: createWrapper(),
})