Skip to content

Instantly share code, notes, and snippets.

View iamkevingreen's full-sized avatar
💭
🍝 🍝 🍝 🍝 🍝 🍝

Kevin Green iamkevingreen

💭
🍝 🍝 🍝 🍝 🍝 🍝
View GitHub Profile
import React, { Component } from 'react';
import { render } from 'react-dom';
// Pages
import Home from './pages/home';
import Product from './pages/product';
class HomeLayout extends Component {
render() {
return (
import React, { Component } from 'react'
import Flickity from 'flickity';
import API from '../api/prismic';
import Helper from '../helper';
class Product extends Component {
constructor(props) {
super(props)
this.state = {
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)
# 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
{
"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",
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})
// 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)
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)
})
const { createClient } = require('contentful')
const config = require('../config')
module.exports = createClient({
space: config.contentful.space,
accessToken: config.contentful.token
})