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
| { | |
| "name": "project-name", | |
| "description": "Template for static sites", | |
| "version": "1.0.0", | |
| "homepage": "http://www.project-name.com", | |
| "author": { | |
| "name": "Adam Reis", | |
| "url": "http://adam.reis.nz" | |
| }, | |
| "license": "UNLICENSED", |
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, { useState, useEffect } from "react"; | |
| import Auth from "@aws-amplify/auth"; | |
| import useNotification from "hooks/useNotification"; | |
| const URLSearchParams = require("url-search-params"); | |
| import { useHistory } from "react-router-dom"; | |
| const CompleteNewPassword = props => { | |
| const history = useHistory(); |
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 { ApolloServer, gql } from 'apollo-server-micro'; | |
| const typeDefs = gql` | |
| type Query { | |
| sayHello: String | |
| } | |
| `; | |
| const resolvers = { | |
| Query: { |
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
| export const logger = (name, ...args) => { | |
| if (process.env.NODE_ENV === 'development') { | |
| // eslint-disable-next-line | |
| console.groupCollapsed(`logger --> ${name}`); | |
| // eslint-disable-next-line | |
| console.log(...args); | |
| // eslint-disable-next-line | |
| console.groupEnd(); | |
| } | |
| }; |
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
| // http://amanvirk.me/singleton-classes-in-es6/ | |
| let instance = null; | |
| class SingletonModuleScopedInstance { | |
| constructor() { | |
| if (!instance) { | |
| instance = this; | |
| } | |
| this._type = 'SingletonModuleScopedInstance'; |
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
| # npm using https for git | |
| git config --global url."https://github.com/".insteadOf git@github.com: | |
| git config --global url."https://".insteadOf git:// | |
| # npm using git for https | |
| git config --global url."git@github.com:".insteadOf https://github.com/ | |
| git config --global url."git://".insteadOf https:// |
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 axios from 'axios'; | |
| class Service { | |
| constructor() { | |
| let service = axios.create({ | |
| headers: {csrf: 'token'} | |
| }); | |
| service.interceptors.response.use(this.handleSuccess, this.handleError); | |
| this.service = service; | |
| } |
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
| /** | |
| * Axios Request Wrapper | |
| * --------------------- | |
| * | |
| * @author Sheharyar Naseer (@sheharyarn) | |
| * @license MIT | |
| * | |
| */ | |
| import axios from 'axios' |
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
| ├── actions | |
| │ ├── comment.actions.js | |
| │ └── post.actions.js | |
| ├── components | |
| │ ├── comment | |
| │ | ├── Comment.js | |
| │ | ├── comment.css | |
| │ | └── Comment.spec.js | |
| │ ├── comments | |
| │ | ├── Comments.js |