This file contains hidden or 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
import { | |
buttonSkinData, | |
buttonSizeData, | |
buttonBtnTypeData, | |
buttonTypeData, | |
buttonTargetData, | |
} from '@luigiclaudio/ga-baseline-ui/button'; | |
import { iconSetData } from '@luigiclaudio/ga-baseline-ui/icon'; | |
export default function (config = {}, collections = []) { |
This file contains hidden or 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
import { graphql, useStaticQuery } from 'gatsby'; | |
const usePrintfulProductsInCms = () => { | |
const { allStoreProducts } = useStaticQuery( | |
graphql` | |
query usePrintfulProductsInCms { | |
allStoreProducts { | |
nodes { | |
productId | |
currency |
This file contains hidden or 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
exports.createSchemaCustomization = ({ actions, schema }) => { | |
actions.createTypes([ | |
` | |
type StoreProductsJson implements Node { | |
product: [StoreProductsJsonProduct] | |
} | |
type StoreProductsJsonProduct { | |
title: String | |
isActive: Boolean |
This file contains hidden or 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
const storeProductsCollection = [ | |
{ | |
label: 'Store', | |
name: 'storeProducts', | |
editor: { preview: false }, | |
format: 'json', | |
files: [ | |
{ | |
label: 'Products', | |
name: 'productsList', |
This file contains hidden or 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
import { graphql, useStaticQuery } from 'gatsby'; | |
const usePrintfulProducts = () => { | |
const { allStoreProducts } = useStaticQuery( | |
graphql` | |
query usePrintfulProducts { | |
allStoreProducts(filter: { productId: { ne: null } }) { | |
nodes { | |
productId | |
currency |
This file contains hidden or 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
exports.createSchemaCustomization = ({ actions, schema }) => { | |
actions.createTypes([ | |
` | |
interface StoreProducts @nodeInterface { | |
id: ID! | |
productTitle: String | |
productId: String | |
printfulProduct: PrintfulProduct | |
currency: String |
NewerOlder