File tree 2 files changed +7
-14
lines changed
2 files changed +7
-14
lines changed Original file line number Diff line number Diff line change 1
- # Since the ".env" file is gitignored, you can use the ".env.example" file to
2
- # build a new ".env" file when you clone the repo. Keep this file up-to-date
3
- # when you add new variables to `.env`.
1
+ NEXT_PUBLIC_SUPABASE_URL =
2
+ NEXT_PUBLIC_SUPABASE_ANON_KEY =
4
3
5
- # This file will be committed to version control, so make sure not to have any
6
- # secrets in it. If you are cloning this repo, create a copy of this file named
7
- # ".env" and populate it with your secrets.
8
-
9
- # When adding additional environment variables, the schema in "/env/schema.mjs"
10
- # should be updated accordingly.
11
-
12
- # Example:
13
- # SERVERVAR="foo"
14
- # NEXT_PUBLIC_CLIENTVAR="bar"
4
+ # Website URL for redirects
5
+ URL = localhost:3000/
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ import { Database } from '../utils/database'
9
9
import { useRouter } from "next/router" ;
10
10
type Profiles = Database [ 'public' ] [ 'Tables' ] [ 'profiles' ] [ 'Row' ]
11
11
12
+ const REDIRECT_URL = process . env . URL
13
+
12
14
const Home : NextPage = ( ) => {
13
15
const supabaseClient = useSupabaseClient < Database > ( )
14
16
const user = useUser ( ) ;
@@ -62,7 +64,7 @@ const Home: NextPage = () => {
62
64
< Layout >
63
65
{
64
66
( ! session ) ?
65
- < Auth redirectTo = "http://localhost:3000/" appearance = { { theme : ThemeSupa } } supabaseClient = { supabaseClient } providers = { [ 'google' ] } socialLayout = "horizontal" />
67
+ < Auth redirectTo = { REDIRECT_URL } appearance = { { theme : ThemeSupa } } supabaseClient = { supabaseClient } providers = { [ 'google' ] } socialLayout = "horizontal" />
66
68
:
67
69
( ! hasProfile ) ?
68
70
< ProfileForm session = { session } />
You can’t perform that action at this time.
0 commit comments