This file contains 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 withCSS = require("@zeit/next-css"); | |
const cssConfig = withCSS({ | |
cssModules: true, | |
webpack: config => { | |
config.module.rules.push({ | |
test: /\.(eot|woff|woff2|ttf|svg|png|jpg|gif)$/, | |
use: { | |
loader: "url-loader", | |
options: { | |
limit: 100000, |
This file contains 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
// reference from auth0 React quickstart guide | |
// https://auth0.com/docs/quickstart/spa/react/#install-the-auth0-react-wrapper | |
// src/react-auth0-wrapper.js | |
import React, { useState, useEffect, useContext } from "react"; | |
import createAuth0Client from "@auth0/auth0-spa-js"; | |
const DEFAULT_REDIRECT_CALLBACK = () => | |
window.history.replaceState({}, document.title, window.location.pathname); | |
export const Auth0Context = React.createContext(); |