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 fetchMachine = Machine({ | |
id:'newOrder', | |
initial: 'DoesNotExist', | |
states: { | |
DoesNotExist: { | |
on: { | |
MB_create_order: 'UNSENT', | |
} | |
}, | |
UNSENT: { |
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 machine = Machine({ | |
id: 'machine', | |
type: 'parallel', | |
states: { | |
order: { | |
initial: 'DoesNotExist', | |
states: { | |
DoesNotExist: { | |
on: { | |
MB_send_order: 'UNSENT', |
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
import {Auth} from '@supabase/ui'; | |
import styles from '../styles/Home.module.css'; | |
import Meta from '../components/Meta'; | |
import Header from '../components/Header'; | |
import {supabase} from '../lib/initSupabase'; | |
// export async function getStaticProps() {} | |
const LoginPage = () => { | |
const {user} = Auth.useUser(); |
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
import {NextPage} from 'next'; | |
import styles from '../styles/Home.module.css'; | |
import Meta from '../components/Meta'; | |
import Header from '../components/Header'; | |
import Footer from '../components/Footer'; | |
import {withPageAuth} from '@supabase/auth-helpers-nextjs'; | |
export const getServerSideProps = withPageAuth({redirectTo: '/login'}); | |
const Profile: NextPage = ({user}) => { |
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
import {NextPage} from 'next'; | |
import {supabaseClient} from '@supabase/auth-helpers-nextjs'; | |
import {useUser} from '@supabase/auth-helpers-react'; | |
import {useEffect, useState} from 'react'; | |
import {Auth} from '@supabase/ui'; | |
import styles from '../styles/Home.module.css'; | |
import Meta from '../components/Meta'; | |
import Header from '../components/Header'; | |
import Footer from '../components/Footer'; | |
import {useRouter} from 'next/router'; |
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
import {GetServerSideProps, InferGetServerSidePropsType, NextPage} from 'next'; | |
import styles from '../styles/Home.module.css'; | |
import Footer from '../components/Footer'; | |
import Header from '../components/Header'; | |
import Meta from '../components/Meta'; | |
import {useEffect, useState} from 'react'; | |
import Link from 'next/link'; | |
import {supabaseClient, withPageAuth} from '@supabase/auth-helpers-nextjs'; | |
export const getServerSideProps: GetServerSideProps = withPageAuth({redirectTo: '/auth'}); |
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
import {GetServerSideProps, InferGetServerSidePropsType, NextPage} from 'next'; | |
import styles from '../styles/Home.module.css'; | |
import Footer from '../components/Footer'; | |
import Header from '../components/Header'; | |
import Meta from '../components/Meta'; | |
import {useEffect, useState} from 'react'; | |
import Link from 'next/link'; | |
import {supabaseClient, withPageAuth} from '@supabase/auth-helpers-nextjs'; | |
export const getServerSideProps: GetServerSideProps = withPageAuth({redirectTo: '/auth'}); |
OlderNewer