This file contains 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 { json } = require('micro') | |
const post = require('micro-post') | |
const updateBlog = require('./api/blog') | |
module.exports = post(async (req, res) => { | |
const parsed = await json(req) | |
switch (parsed.sys.contentType.sys.id) { | |
case 'blog': | |
updateBlog(parsed) |
This file contains 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 contentfulAPI = require('./contentful') | |
module.exports = (data) => { | |
const slug = data.fields.slug['en-US'] | |
contentfulAPI.getEntries({ | |
content_type: 'passports', | |
'fields.slug': slug, | |
include: 8 | |
}).then(({ items }) => { |
This file contains 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 { createClient } = require('contentful') | |
const config = require('../config') | |
module.exports = createClient({ | |
space: config.contentful.space, | |
accessToken: config.contentful.token | |
}) |
This file contains 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 { json } = require('micro') | |
const post = require('micro-post') | |
module.exports = post(async (req, res) => { | |
const parsed = await json(req) | |
console.log('parsed data', parsed) | |
}) |
This file contains 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
// Handles all the things ajax cart related, | |
// based around the timber ajax cart, minus the jquery | |
import serialize from 'form-serialize' | |
import fetch from 'unfetch' | |
const RicherAPI = {} | |
// tacos | |
RicherAPI.onCartUpdate = (cart) => { | |
console.log('items in the cart?', cart.item_count) |
This file contains 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
accounts-base@1.3.4-rc1522.0 | |
accounts-password@1.4.0 | |
alanning:roles@1.2.16 | |
allow-deny@1.0.9 | |
audit-argument-checks@1.0.7 | |
autoupdate@1.3.12 | |
babel-compiler@6.20.0 | |
babel-runtime@1.0.1 | |
base64@1.0.10 | |
binary-heap@1.0.10 |
This file contains 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 _ = require(`lodash`) | |
const Promise = require(`bluebird`) | |
const path = require(`path`) | |
const slash = require(`slash`) | |
// Implement the Gatsby API “createPages”. This is | |
// called after the Gatsby bootstrap is finished so you have | |
// access to any information necessary to programatically | |
// create pages. | |
// Will create pages for Wordpress pages (route : /{slug}) |
This file contains 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
{ | |
"dependencies": { | |
"agentkeepalive": "^3.3.0", | |
"algoliasearch": "^3.22.2", | |
"algoliasearch-helper": "^2.20.1", | |
"alt": "^0.18.4", | |
"babel-runtime": "^6.23.0", | |
"basscss": "^8.0.2", | |
"bcrypt": "^0.8.7", | |
"body-parser": "^1.17.2", |
This file contains 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
# Meteor packages used by this project, one per line. | |
# Check this file (and the other files in this directory) into your repository. | |
# | |
# 'meteor add' and 'meteor remove' will edit this file for you, | |
# but you can also edit it by hand. | |
meteor-base@1.1.0 # Packages every Meteor app needs to have | |
mobile-experience@1.0.4 # Packages for a great mobile UX | |
mongo@1.1.19 # The database Meteor supports right now |
This file contains 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 React, { Component } from 'react' | |
import SendBird from 'sendbird' | |
const SiteStore = require('stores/SiteStore') | |
const Actions = require('actions/SiteActions') | |
export default class MemberMessaging extends Component { | |
constructor(props) { | |
super(props) |