Skip to content

Instantly share code, notes, and snippets.

View sethburtonhall's full-sized avatar

Seth Hall sethburtonhall

View GitHub Profile
@na2hiro
na2hiro / Remix-request-cheatsheet.md
Last active March 18, 2024 02:42
Remix request cheatsheet
@arasmussen
arasmussen / CannyWidget.js
Created October 21, 2019 14:23
Render Canny's feedback widget in ReactJS
import PropTypes from 'prop-types';
import React, { Component } from 'react';
const BoardToken = 'YOUR_BOARD_TOKEN';
export default class CannyWidget extends Component {
static contextTypes = {
viewer: PropTypes.shape({
ssoToken: PropTypes.string,
}),
@arasmussen
arasmussen / CannyContainer.js
Last active November 11, 2021 18:49
Canny: Identifying your users with React
import PropTypes from 'prop-types';
import { Component } from 'react';
const AppID = 'Your App ID';
function loadCannySDK() {
!function(w,d,i,s){function l(){if(!d.getElementById(i)){var f=d.getElementsByTagName(s)[0],e=d.createElement(s);e.type="text/javascript",e.async=!0,e.src="https://canny.io/sdk.js",f.parentNode.insertBefore(e,f)}}if("function"!=typeof w.Canny){var c=function(){c.q.push(arguments)};c.q=[],w.Canny=c,"complete"===d.readyState?l():w.attachEvent?w.attachEvent("onload",l):w.addEventListener("load",l,!1)}}(window,document,"canny-jssdk","script");
}
export default class CannyContainer extends Component {