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, {useState, useEffect, useRef} from 'react' | |
import classNames from 'classnames' | |
import {useIntersection} from 'use-intersection' | |
const Video = ({ | |
video, | |
poster, | |
posterWidth = 1920, | |
posterFitMode = 'preserve', |
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 sanityClient = require('@sanity/client'); | |
const crypto = require('crypto'); | |
const { | |
SANITY_API_TOKEN, | |
SANITY_PROJECT_ID, | |
SANITY_DATASET, | |
SHOPIFY_SECRET | |
} = process.env; |
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 { Link } from 'react-router' | |
import AuthService from '../../utils/AuthService' | |
export default class Home extends Component { | |
constructor(props, context) { | |
super(props, context) | |
this.state = { | |
profile: props.auth.getProfile() | |
} |
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
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) |
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
let Parallax = { | |
init(el, displace) { | |
this.animateItem(el, displace); | |
}, | |
setPosition() { | |
if (window.pageYOffset !== undefined) { | |
return window.pageYOffset; | |
} else { | |
return (document.documentElement || document.body.parentNode || document.body).scrollTop; | |
} |
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 from 'react' | |
import { Router } from '@reach/router' | |
import { pageQuery, productQuery, articleQuery } from '../api/preview.js' | |
import Page from '../templates/page.js' | |
import Product from '../templates/product.js' | |
import Editorial from '../templates/editorial.js' | |
const sanityClient = require('@sanity/client') |
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 Prismic = require('prismic.io'); | |
const endpoint = 'https://yourrepo.prismic.io/api'; | |
const CMS = Prismic.api(endpoint); | |
const cursor = Prismic.Predicates; | |
class API { | |
query(key, value) { | |
return CMS.then((api) => { | |
return api.query(cursor.at(key, value)); |
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 { render } from 'react-dom'; | |
// Pages | |
import Home from './pages/home'; | |
if (document.getElementById('Home')) { // eslint-disable-line | |
render(<HomeLayout />, | |
document.getElementById('Home') // eslint-disable-line | |
); |
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 API from '../api/prismic'; | |
import Carousel from '../globals/carousel' | |
import Helper from '../helper'; | |
class Home extends Component { | |
constructor(props) { | |
super(props) |
NewerOlder