fullcart
Version:
Add stripe checkout to any website
10 lines (8 loc) • 327 B
text/typescript
import { configSchema } from '../schemas/configSchema'
export const fetchConfig = async (url: string = '') => {
const isSever = typeof window === 'undefined'
if (isSever && !url) return
const response = await fetch(url + '/fullcart.json')
const config = await response.json()
return configSchema.parse(config)
}