diff --git a/apps/web/app/(org)/dashboard/caps/components/SharingDialog.tsx b/apps/web/app/(org)/dashboard/caps/components/SharingDialog.tsx index 71d0e4405b..c51f348261 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/content/docs/self-hosting.mdx b/apps/web/content/docs/self-hosting.mdx index 9ab72c4a86..8176e3b503 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. -