Skip to content

Instantly share code, notes, and snippets.

View zanedev's full-sized avatar
💻
Koding

ZaneDev zanedev

💻
Koding
  • San Francisco, CA
View GitHub Profile
@zanedev
zanedev / User.js
Last active April 20, 2020 10:15
Sanity Conditional Field Component
import userStore from 'part:@sanity/base/user';
import { map } from 'rxjs/operators';
export function isAdminUser() {
return userStore.currentUser.pipe(
map(({ user }) => {
const { role } = user;
return role === 'administrator';
})
);
@zanedev
zanedev / GeoSuggestCustomInput.js
Created June 9, 2016 02:20
winterfell react autosuggest custom input wrapper
import React from 'react';
import Geosuggest from 'react-geosuggest';
class GeoSuggestCustomInput extends React.Component {
constructor(props) {
super(props);
this.state = {
value: this.props.value,
};
@zanedev
zanedev / ajaxify-html5.js
Last active December 12, 2015 08:59 — forked from balupton/README.md
// History.js It!
// v1.0.1 - 30 September, 2012
// https://gist.github.com/854622
(function(window,undefined){
// Prepare our Variables
var
History = window.History,
$ = window.jQuery,
document = window.document;