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
const loggedInOrRedirect = (options = {}) => WrappedComponent => { | |
class LoggedInOrRedirect extends React.Component { | |
static displayName = `LoggedInOrRedirect(${getDisplayName( | |
WrappedComponent | |
)})`; | |
render() { | |
const { self, ...passThroughProps } = this.props; | |
if (self.id /* or however we check if someone is logged in */) { | |
return <Redirect to={options.to} />; |
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
{"lastUpload":"2017-07-20T21:00:05.114Z","extensionVersion":"v2.8.2"} |
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 requests | |
from flask import Flask, request | |
app = Flask(__name__) | |
@app.route("/") | |
def respond_to_yo(): | |
api_token = 'da35e2da-128c-47d7-9360-fb73b9eb386a' | |
username = request.args.get('username', '') | |
if username: |