diff --git a/app/src/components/CloneButton.tsx b/app/src/components/CloneButton.tsx index a508a5323..7b4444df7 100644 --- a/app/src/components/CloneButton.tsx +++ b/app/src/components/CloneButton.tsx @@ -6,11 +6,12 @@ import { useContext } from "react"; import { AppContext } from "./AppContextProvider"; import { getFunFlowchartName } from "../lib/getFunFlowchartName"; import { languages } from "../locales/i18n"; -import { useUserId } from "../lib/hooks"; +import { useIsProUser, useUserId } from "../lib/hooks"; import { makeChart, queryClient } from "../lib/queries"; import { useMutation } from "react-query"; export function CloneButton() { + const isProUser = useIsProUser(); const language = useContext(AppContext).language; const userId = useUserId(); const makeChartMutation = useMutation( @@ -34,6 +35,7 @@ export function CloneButton() { }, } ); + if (!isProUser) return null; return (