Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { VideoMetadata } from "@cap/database/types";
import { buildEnv, NODE_ENV } from "@cap/env";
import {
DropdownMenu,
DropdownMenuContent,
Expand Down Expand Up @@ -320,7 +321,11 @@ export const CapCard = ({
tooltipContent="Copy link"
onClick={(e) => {
e.stopPropagation();
handleCopy(cap.id);
handleCopy(
buildEnv.NEXT_PUBLIC_IS_CAP && NODE_ENV === "production"
? `https://cap.link/${cap.id}`
: `${location.origin}/s/${cap.id}`,
Comment on lines +325 to +327
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix missing /s/ path segment in copied production URL.

In production we currently copy https://cap.link/${cap.id}, but the share route in this component still points to /s/${cap.id} (see Line 503). The copied link will 404 without that segment. Please include /s/ in the production branch.

-              ? `https://cap.link/${cap.id}`
+              ? `https://cap.link/s/${cap.id}`
🤖 Prompt for AI Agents
In apps/web/app/(org)/dashboard/caps/components/CapCard/CapCard.tsx around lines
325 to 327, the production branch of the copied share URL omits the required
"/s/" segment causing 404s; update the ternary so the production URL includes
"/s/" (i.e., use "https://cap.link/s/${cap.id}" when buildEnv.NEXT_PUBLIC_IS_CAP
&& NODE_ENV === 'production') so it matches the share route used elsewhere.

);
}}
className="delay-0"
icon={() => {
Expand Down
Loading