diff --git a/web/components/shared/ProBlockerComponents/ProFeatureWrapper.tsx b/web/components/shared/ProBlockerComponents/ProFeatureWrapper.tsx index 50d46c194b..6f09749d72 100644 --- a/web/components/shared/ProBlockerComponents/ProFeatureWrapper.tsx +++ b/web/components/shared/ProBlockerComponents/ProFeatureWrapper.tsx @@ -24,6 +24,16 @@ const descriptions = { "Free plan users can only access data up to 30 days old. Upgrade to Pro for unlimited access to 3m+ data.", invite: "The Free plan does not allow you to invite members to your organization. Upgrade to Pro to invite your team members.", + RateLimit: + "The Free plan does not allow you to set custom rate limits. Upgrade to Pro to set custom rate limits.", +}; + +const titles = { + Datasets: "Unlock Datasets", + Alerts: "Unlock Alerts", + time_filter: "Unlock Time Filter", + invite: "Unlock Invite", + RateLimit: "Unlock Rate Limits", }; export const ProFeatureWrapper = forwardRef< @@ -77,7 +87,9 @@ export const ProFeatureWrapper = forwardRef< - Need more requests? + + {titles[featureName as keyof typeof titles]} +

{customDescription || diff --git a/web/components/shared/helicone/FeatureUpgradeCard.tsx b/web/components/shared/helicone/FeatureUpgradeCard.tsx index bbbafbfc9e..b408aa21bc 100644 --- a/web/components/shared/helicone/FeatureUpgradeCard.tsx +++ b/web/components/shared/helicone/FeatureUpgradeCard.tsx @@ -60,7 +60,7 @@ export const FeatureUpgradeCard: React.FC = ({ > )} - + - diff --git a/web/components/templates/rateLimit/rateLimitPage.tsx b/web/components/templates/rateLimit/rateLimitPage.tsx index 3799605738..9d539e145e 100644 --- a/web/components/templates/rateLimit/rateLimitPage.tsx +++ b/web/components/templates/rateLimit/rateLimitPage.tsx @@ -1,5 +1,5 @@ -import { BookOpenIcon, ShieldCheckIcon } from "@heroicons/react/24/outline"; -import { AreaChart, Badge, Divider } from "@tremor/react"; +import { BookOpenIcon } from "@heroicons/react/24/outline"; +import { AreaChart, Badge } from "@tremor/react"; import Link from "next/link"; import { useState } from "react"; import { TimeFilter } from "../../../lib/api/handlerWrappers"; @@ -19,8 +19,8 @@ import RequestsPageV2 from "../requestsV2/requestsPageV2"; import { useGetPropertiesV2 } from "../../../services/hooks/propertiesV2"; import { getPropertyFiltersV2 } from "../../../services/lib/filters/frontendFilterDefs"; import { useOrg } from "@/components/layout/organizationContext"; -import { Button } from "@/components/ui/button"; -import { DiffHighlight } from "../welcome/diffHighlight"; + +import { FeatureUpgradeCard } from "../../shared/helicone/FeatureUpgradeCard"; const RateLimitPage = (props: {}) => { const [timeFilter, setTimeFilter] = useState({ @@ -37,7 +37,7 @@ const RateLimitPage = (props: {}) => { return currentTimeFilter || "24h"; } }; - const { properties } = useGetPropertiesV2(getPropertyFiltersV2); + const { properties, isLoading } = useGetPropertiesV2(getPropertyFiltersV2); const org = useOrg(); const isPro = @@ -109,71 +109,14 @@ const RateLimitPage = (props: {}) => { } /> - {!isPro || !properties.find((x) => x === "Helicone-Rate-Limit-Status") ? ( -

-
-
- -
- -

- {!isPro - ? "Upgrade to Pro to start using Rate Limits" - : "No Rate Limit Data Found"} -

-

- View our documentation to learn how to use rate limiting. -

-
- - - View Docs - - {!isPro && ( - - - - )} -
- {isPro && ( -
- Or - -
-

- TS/JS Quick Start -

- -
-
- )} -
+ {!isPro && !properties.find((x) => x === "Helicone-Rate-Limit-Status") ? ( +
+
) : ( diff --git a/web/pages/signin.tsx b/web/pages/signin.tsx index 5c7d527a56..3a97507690 100644 --- a/web/pages/signin.tsx +++ b/web/pages/signin.tsx @@ -8,7 +8,6 @@ import { supabaseServer } from "../lib/supabaseServer"; import { Result, err, ok } from "../lib/result"; import PublicMetaData from "../components/layout/public/publicMetaData"; import { useEffect } from "react"; -import { InfoBox } from "../components/ui/helicone/infoBox"; // Import InfoBox export type CustomerPortalContent = { domain: string; diff --git a/web/pages/signup.tsx b/web/pages/signup.tsx index 365bae6572..86445644f3 100644 --- a/web/pages/signup.tsx +++ b/web/pages/signup.tsx @@ -10,7 +10,6 @@ import PublicMetaData from "../components/layout/public/publicMetaData"; import { GetServerSidePropsContext } from "next"; import posthog from "posthog-js"; import { InfoBanner } from "../components/shared/themed/themedDemoBanner"; -import { InfoBox } from "../components/ui/helicone/infoBox"; const SignUp = () => { const supabase = useSupabaseClient();