Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 1178 #1181

Merged
merged 1 commit into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/_components/activities/ActivityDetails.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@
(x) => x.value === sessionLocation?.destination
)?.label;

let edit = $page.query.get('edit');
let isNew = $page.query.get('isNew');
let isUpdated = $page.query.get('isUpdated');
let edit = $page.url.searchParams.get('edit');
let isNew = $page.url.searchParams.get('isNew');
let isUpdated = $page.url.searchParams.get('isUpdated');

let favoriteDisabled = false;

Expand Down Expand Up @@ -147,7 +147,7 @@
isInWindow = inSession;

if (!inSession) {
const join = $page.query.get('join');
const join = $page.url.searchParams.get('join');
if (join) isInWindow = true;
}
}, 1000);
Expand Down
2 changes: 1 addition & 1 deletion src/_components/activities/Card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
hasExpired = dayjs().isAfter(currentEndTime);

if (!inSession) {
const join = $page.query.get('join');
const join = $page.url.searchParams.get('join');
if (join) isInWindow = true;
}
}, 1000);
Expand Down
3 changes: 2 additions & 1 deletion src/routes/activities/create/cfp.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
import Create from './index.svelte';

onMount(() => {
if (!$page.query.has('event')) window.history.replaceState(null, null, `?event=${eventId}`);
if (!$page.url.searchParams.has('event'))
window.history.replaceState(null, null, `?event=${eventId}`);
});

const metaTags = ((title = `THAT Conference Texas and Wisconsin call for speakers.`) => ({
Expand Down
4 changes: 3 additions & 1 deletion src/routes/login-redirect.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<script>
import { page } from '$app/stores';

const returnTo = $page.query.has('returnTo') ? $page.query.get('returnTo') : '/';
const returnTo = $page.url.searchParams.has('returnTo')
? $page.url.searchParams.get('returnTo')
: '/';
</script>

<div
Expand Down
16 changes: 12 additions & 4 deletions src/routes/orders/success/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,18 @@
target location - [TL=on&TL=at]
*/

const isBulkPurchase = $page.query.has('B') ? Boolean(parseInt($page.query.get('B'))) : false;
const isMembership = $page.query.has('M') ? Boolean(parseInt($page.query.get('M'))) : false;
const eventLocation = $page.query.has('EL') ? $page.query.get('EL') : undefined;
const targetLocations = $page.query.has('TL') ? $page.query.getAll('TL') : [];
const isBulkPurchase = $page.url.searchParams.has('B')
? Boolean(parseInt($page.url.searchParams.get('B')))
: false;
const isMembership = $page.url.searchParams.has('M')
? Boolean(parseInt($page.url.searchParams.get('M')))
: false;
const eventLocation = $page.url.searchParams.has('EL')
? $page.url.searchParams.get('EL')
: undefined;
const targetLocations = $page.url.searchParams.has('TL')
? $page.url.searchParams.getAll('TL')
: [];
</script>

<Seo title={metaTags.title} tags={metaTags.tags} />
Expand Down
2 changes: 1 addition & 1 deletion src/routes/promo/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
})
}))();

const eventId = $page.query.get('eventId');
const eventId = $page.url.searchParams.get('eventId');
const { send } = getContext('cart');

let event;
Expand Down