MCPcopy
hub / github.com/tone-row/flowchart-fun / SvgProOnlyPopover

Function SvgProOnlyPopover

app/src/components/SvgProOnlyPopover.tsx:12–37  ·  view source on GitHub ↗
({ children }: { children: ReactNode })

Source from the content-addressed store, hash-verified

10 * sponsor page.
11 */
12export function SvgProOnlyPopover({ children }: { children: ReactNode }) {
13 const hasProAccess = useHasProAccess();
14 if (hasProAccess) return <>{children}</>;
15 return (
16 <HoverCard.Root>
17 <HoverCard.Trigger asChild>{children}</HoverCard.Trigger>
18 <HoverCard.Content className="no-bg">
19 <div className="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-4 overflow-hidden">
20 <p className="text-gray-800 dark:text-gray-100 text-sm">
21 <Trans>
22 This feature is only available to pro users.{" "}
23 <a
24 href="/pricing"
25 data-to-pricing="SVG Pro Only Popover"
26 className="text-blue-500 hover:underline"
27 >
28 Become a pro user
29 </a>{" "}
30 to unlock it.
31 </Trans>
32 </p>
33 </div>
34 </HoverCard.Content>
35 </HoverCard.Root>
36 );
37}

Callers

nothing calls this directly

Calls 1

useHasProAccessFunction · 0.90

Tested by

no test coverage detected