Skip to content

Instantly share code, notes, and snippets.

@audrl1010
Created February 21, 2019 08:27
Show Gist options
  • Select an option

  • Save audrl1010/e9d48da9031d5a620bb4561977da8c92 to your computer and use it in GitHub Desktop.

Select an option

Save audrl1010/e9d48da9031d5a620bb4561977da8c92 to your computer and use it in GitHub Desktop.

Revisions

  1. audrl1010 revised this gist Feb 21, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion signIn+signOff.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Sign In
    ```javascript
    import defaultPage from "../../hocs/defaultPage"
    import { show } from "../../utils/lock
    import { show } from "../../utils/lock";

    class SignIn extends React.Component {
    componentDidMount() {
  2. audrl1010 created this gist Feb 21, 2019.
    37 changes: 37 additions & 0 deletions signIn+signOff.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    # Sign In
    ```javascript
    import defaultPage from "../../hocs/defaultPage"
    import { show } from "../../utils/lock
    class SignIn extends React.Component {
    componentDidMount() {
    show()
    }
    render() {
    return <div></div>
    }
    }
    export default defaultPage(SignIn)
    ```
    # Sign Off
    ```javascript
    import React from "react"
    import { unsetToken } from "../../utils/auth";
    import { logout } from "../../utils/lock";
    export default class SignOff extends React.Component {
    componentDidMount() {
    unsetToken();
    logout();
    }
    render() {
    return null
    }
    }
    ```