From 645cba58cdb38e749e4ab936c0475ffe61f4fca1 Mon Sep 17 00:00:00 2001 From: Rob Gordon Date: Mon, 8 Jan 2024 21:44:24 -0500 Subject: [PATCH] Link Icon --- app/src/components/CloneButton.tsx | 4 +++- app/src/components/Header.tsx | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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 (