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 { 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 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 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 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 { createClient } = require('contentful') | |
const config = require('../config') | |
module.exports = createClient({ | |
space: config.contentful.space, | |
accessToken: config.contentful.token | |
}) |
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 { 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 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
// 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 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
[email protected] | |
[email protected] | |
alanning:[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] |
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 _ = 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 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
{ | |
"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 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
# 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. | |
[email protected] # Packages every Meteor app needs to have | |
[email protected] # Packages for a great mobile UX | |
[email protected] # The database Meteor supports right now |
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 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) |