Skip to content

Instantly share code, notes, and snippets.

View ernestofreyreg's full-sized avatar
🚢
Just ship it

Ernesto Freyre ernestofreyreg

🚢
Just ship it
View GitHub Profile
import * as React from 'react'
import { NextPage } from 'next'
import { useAuth0 } from '../lib/auth0-spa'
interface Props {}
const Page: NextPage<Props> = () => {
const { isAuthenticated, loginWithRedirect, logout, user } = useAuth0()
return (
import React from 'react'
import { useAuth0 } from '../lib/auth0-spa'
interface Props {}
const NavigationBar: React.FunctionComponent<Props> = () => {
const { isAuthenticated, loginWithRedirect, logout, loading } = useAuth0()
return (
<div>
import * as React from 'react'
import { NextPage } from 'next'
import { useAuth0 } from '../lib/auth0-spa'
import NavigationBar from '../components/NavigationBar'
interface Props {}
const Page: NextPage<Props> = () => {
const { user } = useAuth0()
import * as React from 'react'
import { NextPage } from 'next'
import { useAuth0 } from '../lib/auth0-spa'
import NavigationBar from '../components/NavigationBar'
import Link from 'next/link'
interface Props {}
const Page: NextPage<Props> = () => {
const { user } = useAuth0()
import * as React from 'react'
import { NextPage } from 'next'
import { useAuth0 } from '../lib/auth0-spa'
import Link from 'next/link'
import NavigationBar from '../components/NavigationBar'
interface Props {}
const DashboardPage: NextPage<Props> = () => {
const { user } = useAuth0()
import * as React from 'react'
import { NextPage } from 'next'
import { requireUser, useAuth0 } from '../lib/auth0-spa'
import Link from 'next/link'
import NavigationBar from '../components/NavigationBar'
interface Props {}
const DashboardPage: NextPage<Props> = () => {
const { user } = useAuth0()
import * as React from 'react'
import { NextPage } from 'next'
interface Props {}
const Auth0CallbackPage: NextPage<Props> = () => null
export default Auth0CallbackPage
addEventListener('fetch', event => {
event.respondWith(new Response('Hello Worker'))
})
import { getAssetFromKV, mapRequestToAsset } from '@cloudflare/kv-asset-handler'
/**
* The DEBUG flag will do two things that help during development:
* 1. we will skip caching on the edge, which makes it easier to
* debug.
* 2. we will return an error message on exception in your Response rather
* than the default 404.html page.
*/
const DEBUG = false
import { getAssetFromKV, mapRequestToAsset } from '@cloudflare/kv-asset-handler'
const DEBUG = false
addEventListener('fetch', event => {
try {
event.respondWith(handleEvent(event))
} catch (e) {
if (DEBUG) {
return event.respondWith(