-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61edd8b
commit e79c87c
Showing
3 changed files
with
4 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import { redirect } from '@sveltejs/kit'; | ||
import type { PageServerLoad } from './$types'; | ||
import { CI_TEST } from '$lib/utils/env_constants'; | ||
|
||
const redirectURL = CI_TEST ? '/analytics' : '/analytics?refresh=1'; | ||
|
||
export const load: PageServerLoad = async () => { | ||
redirect(301, redirectURL); | ||
export const load: PageServerLoad = async ({ url }) => { | ||
const queryParams = url.searchParams.has("refresh") ? "?refresh=1" : ""; | ||
redirect(301, `/analytics${queryParams}`); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters