Skip to content

Commit eb6efa1

Browse files
Fixes
1 parent 6420fbc commit eb6efa1

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/routes/+page.svelte

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@
3939
toSet.add(previousTab);
4040
visitedTabs = [...toSet];
4141
42-
// I have no clue how this can be undefined
4342
if (newTab) {
44-
// @ts-expect-error Svelte 5, please
45-
previousTab = newTab;
46-
pushState(`?${queryParam}=${newTab}`, {});
43+
previousTab = newTab as Tab;
44+
pushState(`?${tabQueryParam}=${newTab}`, {});
4745
}
4846
}
4947
@@ -64,10 +62,10 @@
6462
}
6563
6664
// Tab change from the URL
67-
const queryParam = "tab";
65+
const tabQueryParam = "tab";
6866
let shouldUnsubscribe = false;
6967
const unsubscribe = page.subscribe(({ url }) => {
70-
const tab = url.searchParams.get(queryParam) as Tab | null;
68+
const tab = url.searchParams.get(tabQueryParam) as Tab | null;
7169
if (!tab) {
7270
shouldUnsubscribe = true;
7371
return;

src/routes/login/callback/+page.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ export async function load({ cookies, url }) {
1616

1717
const tokens = await github.validateAuthorizationCode(code);
1818

19-
return redirect(302, `/?${tokenKey}=${tokens.accessToken}`);
19+
redirect(302, `/?${tokenKey}=${tokens.accessToken}`);
2020
}

0 commit comments

Comments
 (0)