import { createClient } from '@supabase/supabase-js' import { Button, Image } from 'ui' import { useState } from 'react' // Import Swiper React components import { useRouter } from 'next/router' import NextImage from 'next/image' import { ColorSwatchIcon, MenuIcon } from '@heroicons/react/outline' import { Auth } from '@supabase/auth-ui-react' import { ThemeSupa } from '@supabase/auth-ui-shared' import { useTheme } from 'next-themes' function AuthWidgetSection() { const supabase = createClient( 'https://rsnibhkhsbfnncjmwnkj.supabase.co', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYxNTIxNDE1MywiZXhwIjoxOTMwNzkwMTUzfQ.OQEbAaTfgDdLCCht251P2JRD3QDnui6nsU8N-tZA_Mc' ) const { resolvedTheme } = useTheme() const { basePath } = useRouter() const [radius, setRadius] = useState('4px') const [brandColor, setBrandColor] = useState({ brand: 'hsl(var(--brand-default))', brandAccent: 'hsl(var(--brand-500))', brandAccent2: 'hsl(var(--brand-200))', }) const [layout, setLayout] = useState('horizontal') // // store API swiper instance const [imageSwiper, setImageSwiper] = useState(undefined) const [imageSwiperActiveIndex, setImageSwiperActiveIndex] = useState(0) function handleNavChange(e: number) { console.log(e) setImageSwiperActiveIndex(e) // @ts-ignore imageSwiper.slideTo(e) } const AuthContainer = (props: any) => { const { user } = Auth.useUser() if (user) { return ( <>

Signed in: {user.email}

) } return props.children } return (

Acme Industries

Sign in today for Supa stuff

Auth UI

Pre-built auth widgets to get started in minutes.

Customizable authentication UI component with custom themes and extensible styles to match your brand and aesthetic

React only. Other frameworks coming soon.
{' '}
) } export default AuthWidgetSection