mirror of
https://github.com/vercel/commerce.git
synced 2025-07-27 12:11:23 +00:00
.vscode
assets
components
config
framework
bigcommerce
commerce
local
local-old
shopify
swell
api
cart
catalog
checkout
customers
operations
get-page.ts
utils
wishlist
customer.ts
index.ts
auth
cart
common
customer
product
utils
wishlist
.env.template
commerce.config.json
const.ts
fetcher.ts
index.tsx
next.config.js
provider.ts
schema.d.ts
schema.graphql
swell-js.d.ts
types.ts
vendure
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
26 lines
454 B
TypeScript
26 lines
454 B
TypeScript
import { Page } from '../../schema'
|
|
import { SwellConfig, getConfig } from '..'
|
|
|
|
export type GetPageResult<T extends { page?: any } = { page?: Page }> = T
|
|
|
|
export type PageVariables = {
|
|
id: string
|
|
}
|
|
|
|
async function getPage({
|
|
url,
|
|
variables,
|
|
config,
|
|
preview,
|
|
}: {
|
|
url?: string
|
|
variables: PageVariables
|
|
config?: SwellConfig
|
|
preview?: boolean
|
|
}): Promise<GetPageResult> {
|
|
config = getConfig(config)
|
|
return {}
|
|
}
|
|
|
|
export default getPage
|