Skip to content

Commit

Permalink
Fix tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaHegde committed Nov 14, 2024
1 parent 9072c02 commit 07b78c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions scripts/tsc-with-whitelist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ web-admin/src/features/scheduled-reports/selectors.ts: error TS2345
web-admin/src/features/billing/issues/getMessageForTrialPlan.ts: error TS18048
web-admin/src/features/billing/plans/selectors.ts: error TS18048
web-admin/src/routes/[organization]/-/settings/+layout.ts: error TS2307
web-admin/src/routes/[organization]/-/settings/+page.ts: error TS2307
web-admin/src/routes/[organization]/-/settings/billing/+page.ts: error TS2307
web-admin/src/routes/[organization]/-/settings/billing/payment/+page.ts: error TS2307
web-admin/src/routes/[organization]/-/settings/billing/upgrade/+page.ts: error TS2307
Expand Down
9 changes: 5 additions & 4 deletions web-admin/src/features/navigation/getSingleUseUrlParam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ export function getSingleUseUrlParam(
) {
// Save the state in localStorage and redirect to the url without it.
// This prevents a refresh or saving the url from re-triggering in the page
if (url.searchParams.has(param)) {
const paramValue = url.searchParams.get(param);
if (paramValue) {
try {
localStorage.setItem(storageKey, url.searchParams.get(param));
localStorage.setItem(storageKey, paramValue);
} catch {
// no-op
}
Expand All @@ -18,7 +19,7 @@ export function getSingleUseUrlParam(
throw redirect(307, redirectUrl.pathname + redirectUrl.search);
}

const value = localStorage.getItem(storageKey);
const localStorageValue = localStorage.getItem(storageKey);
localStorage.removeItem(storageKey);
return value;
return localStorageValue;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getSingleUseUrlParam } from "@rilldata/web-admin/features/navigation/getSingleUseUrlParam";

export const load: PageLoad = async ({ url }) => {
export const load = async ({ url }) => {
const showWelcomeDialog = !!getSingleUseUrlParam(
url,
"welcome",
Expand Down

0 comments on commit 07b78c7

Please sign in to comment.