iuioiua
iuioiua
DDeno
Created by iuioiua on 3/3/2023 in #help
I'd like to change the background colour of the `body` element in Fresh. How do I do that simply?
(see title)
8 replies
DDeno
Created by iuioiua on 2/7/2023 in #help
Supabase Auth UI in Fresh
I'm building a simple web. I'd like to use Supabase's Auth UI, namely the Auth component, for handling the login and signup forms. I'd like to get the following working:
import { Auth } from "https://esm.sh/@supabase/auth-ui-react@0.2.6";
import { createClient } from "https://esm.sh/@supabase/supabase-js@2.7.0?alias=react:preact/compat&deps=preact@10.12.0";

const supabaseClient = createClient(
Deno.env.get("SUPABASE_URL")!,
Deno.env.get("SUPABASE_ANON_KEY")!,
);

export default function LoginPage() {
return <Auth supabaseClient={supabaseClient} />;
}
import { Auth } from "https://esm.sh/@supabase/auth-ui-react@0.2.6";
import { createClient } from "https://esm.sh/@supabase/supabase-js@2.7.0?alias=react:preact/compat&deps=preact@10.12.0";

const supabaseClient = createClient(
Deno.env.get("SUPABASE_URL")!,
Deno.env.get("SUPABASE_ANON_KEY")!,
);

export default function LoginPage() {
return <Auth supabaseClient={supabaseClient} />;
}
However, I get the following error:
An error occurred during route handling or page rendering. TypeError: Cannot read properties of null (reading 'useState')
at n.useState (https://esm.sh/stable/react@18.2.0/deno/react.js:2:6785)
at Object.ee (https://esm.sh/v106/@supabase/auth-ui-react@0.2.6/deno/auth-ui-react.js:2:40881)
at https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1830
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1857)
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1933)
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1074)
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1933)
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1933)
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1933)
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1933)
An error occurred during route handling or page rendering. TypeError: Cannot read properties of null (reading 'useState')
at n.useState (https://esm.sh/stable/react@18.2.0/deno/react.js:2:6785)
at Object.ee (https://esm.sh/v106/@supabase/auth-ui-react@0.2.6/deno/auth-ui-react.js:2:40881)
at https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1830
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1857)
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1933)
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1074)
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1933)
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1933)
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1933)
at T (https://esm.sh/v106/preact-render-to-string@5.2.6/X-ZS8q/deno/preact-render-to-string.js:12:1933)
How can I get this page working? I suspect a tweak is needed to bridge some compatibility gap.
10 replies