update get product hook

This commit is contained in:
Greg Hoskin
2021-04-01 16:32:12 -06:00
parent 1ebf458fb2
commit 18936b7544
8 changed files with 103 additions and 131 deletions

View File

@@ -1,8 +1,12 @@
import { swellConfig } from '../../index'
const fetchSwellApi = async (query: string, method: string) => {
const fetchSwellApi = async (
query: string,
method: string,
variables: object | string
) => {
const { swell } = swellConfig
const res = await swell[query][method]()
const res = await swell[query][method](variables)
return res
}