We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58aa499 commit b49a477Copy full SHA for b49a477
frontend/src/routes/_account.plan.index.tsx
@@ -25,14 +25,13 @@ export const query = queryOptions({
25
26
export const Route = createFileRoute("/_account/plan/")({
27
loader: async ({ context }) => {
28
- const { planManagementIframeUri } = (
29
- await context.queryClient.ensureQueryData(query)
30
- ).siteConfig;
31
- if (planManagementIframeUri) {
32
- preload(planManagementIframeUri, { as: "document" });
33
- } else {
34
- throw redirect({ to: "/" });
35
- }
+ const { siteConfig: { planManagementIframeUri } } =
+ await context.queryClient.ensureQueryData(query);
+
+ if (!planManagementIframeUri)
+ throw redirect({ to: "/", replace: true });
+ preload(planManagementIframeUri, { as: "document" });
36
},
37
component: Plan,
38
});
0 commit comments