File tree 5 files changed +15
-23
lines changed
5 files changed +15
-23
lines changed Original file line number Diff line number Diff line change 1
1
VITE_SUPABASE_URL = https://<redacted>.supabase.co
2
2
VITE_SUPABASE_ANON_KEY = <redacted>
3
- PUBLIC_BASE_URL = http://localhost:3000
Original file line number Diff line number Diff line change @@ -9,3 +9,10 @@ export function ipInfo(ip) {
9
9
const url = "http://www.geoplugin.net/json.gp?ip=" + ip ;
10
10
return fetch ( url ) . then ( ( response ) => response . json ( ) ) ;
11
11
}
12
+
13
+ /**
14
+ * @param {string } name
15
+ */
16
+ export function link ( name ) {
17
+ return "/login?next" + encodeURIComponent ( "=" + name + "?" ) ;
18
+ }
Original file line number Diff line number Diff line change 1
1
<script >
2
- import Header from " ./Header.svelte" ;
3
2
import " ./styles.css" ;
4
3
import " @fontsource/lato" ;
5
4
import " @fontsource/raleway/500.css" ;
5
+ import Header from " ./Header.svelte" ;
6
6
</script >
7
7
8
8
<div class =" app" >
Original file line number Diff line number Diff line change 1
1
<script >
2
2
// @ts-nocheck
3
-
4
- import { PUBLIC_BASE_URL } from " $env/static/public" ;
5
- import { mustLogIn } from " ./store.js" ;
6
3
import " @fontsource/lato/300.css" ;
7
4
import " @fontsource/lato/400.css" ;
8
-
9
- function link (name ) {
10
- return PUBLIC_BASE_URL + " /login?next" + encodeURIComponent (" =" + name + " ?" );
11
- }
12
-
13
- function normal () {
14
- return PUBLIC_BASE_URL ;
15
- }
5
+ import { link } from " $lib/util" ;
6
+ import { mustLogIn } from " ./store.js" ;
16
7
</script >
17
8
18
9
<header >
45
36
>
46
37
Register
47
38
</a >
48
- <a href ={ normal ()} on:click ={() => mustLogIn .set (false )} class =" log" id =" login" >
39
+ <a href ="/login" on:click ={() => mustLogIn .set (false )} class =" log" id =" login" >
49
40
Login
50
41
</a >
51
42
</div >
Original file line number Diff line number Diff line change 1
1
<script >
2
2
// @ts-nocheck
3
-
4
3
import { browser } from " $app/environment" ;
5
- import { page } from " $app/stores" ;
6
- import { webVitals } from " $lib/vitals" ;
7
- import { PUBLIC_BASE_URL } from " $env/static/public" ;
4
+ import { detectOS } from " $lib/util.js" ;
5
+ import { link } from " $lib/util" ;
8
6
import { mustLogIn } from " ../store.js" ;
9
7
import { onMount } from " svelte" ;
10
- import { detectOS } from " $lib/util.js" ;
11
-
12
- function link (name ) {
13
- return PUBLIC_BASE_URL + " /login?next" + encodeURIComponent (" =" + name + " ?" );
14
- }
8
+ import { page } from " $app/stores" ;
9
+ import { webVitals } from " $lib/vitals" ;
15
10
16
11
let loaded = false ;
17
12
You can’t perform that action at this time.
0 commit comments