forked from crowetic/commerce
.vscode
assets
components
config
framework
bigcommerce
commerce
shopify
swell
vendure
api
auth
cart
common
get-all-pages.ts
get-page.ts
get-site-info.ts
customer
lib
product
wishlist
.env.template
README.md
codegen.json
commerce.config.json
fetcher.ts
index.tsx
next.config.js
provider.ts
schema.d.ts
schema.graphql
types.ts
lib
pages
public
.editorconfig
.env.template
.gitignore
.prettierignore
.prettierrc
README.md
codegen.json
commerce.config.json
global.d.ts
license.md
next-env.d.ts
next.config.js
package.json
postcss.config.js
tailwind.config.js
tsconfig.json
yarn.lock
* Minimal list/detail views working with Vendure * Implement useCart/useAddItem * Implement useUpdateItem & useRemoveItem * Implement useSearch * Add operations codegen, tidy up * Dummy checkout page * Implement auth/customer hooks * Use env var for Shop API url * Add some documentation * Improve error handling * Optimize preview image size * Fix accidental change * Update Vendure provider to latest changes * Vendure provider: split out gql operations, remove unused files * Update Vendure provider readme * Add local next.config to Vendure provider, update docs * Update to use demo server * Fix build errors * Use proxy for vendure api * Simplify instructions in Vendure readme * Refactor Vendure checkout api handler * Improve image quality
36 lines
675 B
TypeScript
36 lines
675 B
TypeScript
import { getConfig, VendureConfig } from '../api'
|
|
|
|
export type Page = any
|
|
|
|
export type GetAllPagesResult<
|
|
T extends { pages: any[] } = { pages: Page[] }
|
|
> = T
|
|
|
|
async function getAllPages(opts?: {
|
|
config?: VendureConfig
|
|
preview?: boolean
|
|
}): Promise<GetAllPagesResult>
|
|
|
|
async function getAllPages<T extends { pages: any[] }>(opts: {
|
|
url: string
|
|
config?: VendureConfig
|
|
preview?: boolean
|
|
}): Promise<GetAllPagesResult<T>>
|
|
|
|
async function getAllPages({
|
|
config,
|
|
preview,
|
|
}: {
|
|
url?: string
|
|
config?: VendureConfig
|
|
preview?: boolean
|
|
} = {}): Promise<GetAllPagesResult> {
|
|
config = getConfig(config)
|
|
|
|
return {
|
|
pages: [],
|
|
}
|
|
}
|
|
|
|
export default getAllPages
|