diff --git a/web-common/src/components/ErrorPage.svelte b/web-common/src/components/ErrorPage.svelte
index 4b6b804790c..19de4c82774 100644
--- a/web-common/src/components/ErrorPage.svelte
+++ b/web-common/src/components/ErrorPage.svelte
@@ -1,8 +1,10 @@
@@ -23,7 +27,7 @@
{/if}
{body}
- {#if !fatal}
+ {#if !fatal && !onEmbedPage}
Back to home
{/if}
{#if detail}
diff --git a/web-common/src/layout/navigation/navigation-utils.ts b/web-common/src/layout/navigation/navigation-utils.ts
index 08ed7a6c223..786518b001c 100644
--- a/web-common/src/layout/navigation/navigation-utils.ts
+++ b/web-common/src/layout/navigation/navigation-utils.ts
@@ -1,11 +1,12 @@
import { appScreen } from "@rilldata/web-common/layout/app-store";
-import { get } from "svelte/store";
import { behaviourEvent } from "@rilldata/web-common/metrics/initMetrics";
import { BehaviourEventMedium } from "@rilldata/web-common/metrics/service/BehaviourEventTypes";
import {
MetricsEventScreenName,
MetricsEventSpace,
} from "@rilldata/web-common/metrics/service/MetricsTypes";
+import type { Page } from "@sveltejs/kit";
+import { get } from "svelte/store";
export function getNavURLToScreenMap(href: string) {
if (href.includes("/source/")) return MetricsEventScreenName.Source;
@@ -26,3 +27,7 @@ export async function emitNavigationTelemetry(href: string, name: string) {
screenName,
);
}
+
+export function isEmbedPage(page: Page): boolean {
+ return page.route.id === "/-/embed";
+}