-
-
- {t('billing.upgradePlan') || 'Changer de plan'}
-
-
+ {!isPaid && (
+
+
+
+ {t('billing.upgradePlan') || 'Changer de plan'}
+
+
{billingEnabled && (
@@ -603,6 +604,7 @@ export function BillingPlans() {
))}
+ )}
{/* Footer Info */}
diff --git a/memento-note/hooks/use-auto-tagging.ts b/memento-note/hooks/use-auto-tagging.ts
index 917ba36..88f48c5 100644
--- a/memento-note/hooks/use-auto-tagging.ts
+++ b/memento-note/hooks/use-auto-tagging.ts
@@ -8,9 +8,10 @@ interface UseAutoTaggingProps {
content: string;
notebookId?: string | null;
enabled?: boolean;
+ onQuotaExceeded?: () => void;
}
-export function useAutoTagging({ content, notebookId, enabled = true }: UseAutoTaggingProps) {
+export function useAutoTagging({ content, notebookId, enabled = true, onQuotaExceeded }: UseAutoTaggingProps) {
const { language } = useLanguage();
const { hasAiConsent, requestAiConsent } = useAiConsent();
const [suggestions, setSuggestions] = useState([]);
@@ -62,6 +63,9 @@ export function useAutoTagging({ content, notebookId, enabled = true }: UseAutoT
if (controller.signal.aborted) return;
if (!response.ok) {
+ if (response.status === 402 && onQuotaExceeded) {
+ onQuotaExceeded();
+ }
throw new Error('Error during analysis');
}
@@ -75,7 +79,7 @@ export function useAutoTagging({ content, notebookId, enabled = true }: UseAutoT
setIsAnalyzing(false);
}
}
- }, [hasAiConsent, requestAiConsent]);
+ }, [hasAiConsent, requestAiConsent, onQuotaExceeded]);
// Trigger on content change
useEffect(() => {