From 1418b5db13adf3bffc7d5982af8f142f74682efe Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Fri, 31 Oct 2025 20:59:53 +0800 Subject: [PATCH 1/3] don't rely on NEXT_PUBLIC_WEB_URL in embed code --- .../caps/components/SharingDialog.tsx | 42 +++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/apps/web/app/(org)/dashboard/caps/components/SharingDialog.tsx b/apps/web/app/(org)/dashboard/caps/components/SharingDialog.tsx index 71d0e4405b5..c51f348261c 100644 --- a/apps/web/app/(org)/dashboard/caps/components/SharingDialog.tsx +++ b/apps/web/app/(org)/dashboard/caps/components/SharingDialog.tsx @@ -16,13 +16,14 @@ import { useMutation } from "@tanstack/react-query"; import clsx from "clsx"; import { motion } from "framer-motion"; import { Check, Globe2, Search } from "lucide-react"; -import { useCallback, useEffect, useState } from "react"; +import { useCallback, useEffect, useMemo, useState } from "react"; import { toast } from "sonner"; import { shareCap } from "@/actions/caps/share"; import { useDashboardContext } from "@/app/(org)/dashboard/Contexts"; import type { Spaces } from "@/app/(org)/dashboard/dashboard-data"; import { SignedImageUrl } from "@/components/SignedImageUrl"; import { Tooltip } from "@/components/Tooltip"; +import { usePublicEnv } from "@/utils/public-env"; interface SharingDialogProps { isOpen: boolean; @@ -182,13 +183,9 @@ export const SharingDialog: React.FC = ({ }); }; - const handleCopyEmbedCode = async () => { - const embedCode = `
`; + const embedCode = useEmbedCode(capId); + const handleCopyEmbedCode = async () => { try { await navigator.clipboard.writeText(embedCode); toast.success("Embed code copied to clipboard"); @@ -325,11 +322,7 @@ export const SharingDialog: React.FC = ({
- {`
`} + {embedCode}
, ), - NoSuchElementException: () => Effect.sync(notFound()), + NoSuchElementException: () => Effect.sync(() => notFound()), }), provideOptionalAuth, EffectRuntime.runPromise, diff --git a/apps/web/middleware.ts b/apps/web/middleware.ts index ea5942df394..ff30a4bb706 100644 --- a/apps/web/middleware.ts +++ b/apps/web/middleware.ts @@ -41,6 +41,7 @@ export async function middleware(request: NextRequest) { if ( !( path.startsWith("/s/") || + path.startsWith("/middleware") || path.startsWith("/dashboard") || path.startsWith("/onboarding") || path.startsWith("/api") || From b8e939f25e74af57599389d68341e1985e5e3012 Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Fri, 31 Oct 2025 21:04:28 +0800 Subject: [PATCH 3/3] remove videos --- apps/web/content/docs/self-hosting.mdx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/apps/web/content/docs/self-hosting.mdx b/apps/web/content/docs/self-hosting.mdx index 9ab72c4a86f..8176e3b5038 100644 --- a/apps/web/content/docs/self-hosting.mdx +++ b/apps/web/content/docs/self-hosting.mdx @@ -40,8 +40,6 @@ and [MinIO](https://min.io) for storing videos. Once deployed, login email links will be available in Railway’s Deploy Logs. -