Skip to content

Commit

Permalink
fix: closes #1178
Browse files Browse the repository at this point in the history
  • Loading branch information
theClarkSell committed Feb 3, 2022
1 parent a3ba6f1 commit bad3a20
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 12 deletions.
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

0 comments on commit bad3a20

Please sign in to comment.