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 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'; | |
}) | |
); |
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 from 'react'; | |
import Geosuggest from 'react-geosuggest'; | |
class GeoSuggestCustomInput extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
value: this.props.value, | |
}; |
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
// 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; |