1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-31 21:11:44 +02:00

Improve the non paid user headings

This commit is contained in:
Kamran Ahmed
2025-03-14 02:14:05 +00:00
parent f72d4ddc40
commit b74f290995

View File

@@ -31,12 +31,14 @@ export function AICourseLimit(props: AICourseLimitProps) {
const totalPercentage = getPercentage(used, limit); const totalPercentage = getPercentage(used, limit);
// has consumed 80% of the limit // has consumed 85% of the limit
const isNearLimit = used >= limit * 0.8; const isNearLimit = used >= limit * 0.85;
const isPaidUser = userBillingDetails.status === 'active'; const isPaidUser = userBillingDetails.status === 'active';
return ( return (
<> <>
{!isPaidUser ||
(isNearLimit && (
<button <button
className="mr-1 flex items-center gap-1 text-sm font-medium underline underline-offset-2 lg:hidden" className="mr-1 flex items-center gap-1 text-sm font-medium underline underline-offset-2 lg:hidden"
onClick={() => onShowLimits()} onClick={() => onShowLimits()}
@@ -44,6 +46,7 @@ export function AICourseLimit(props: AICourseLimitProps) {
<Info className="size-4" /> <Info className="size-4" />
{totalPercentage}% limit used {totalPercentage}% limit used
</button> </button>
))}
{(!isPaidUser || isNearLimit) && ( {(!isPaidUser || isNearLimit) && (
<button <button