diff --git a/frontend/src/components/billing/billing-modal.tsx b/frontend/src/components/billing/billing-modal.tsx index d6dbc693..8f573fcc 100644 --- a/frontend/src/components/billing/billing-modal.tsx +++ b/frontend/src/components/billing/billing-modal.tsx @@ -25,7 +25,7 @@ interface BillingModalProps { returnUrl?: string; } -export function BillingModal({ open, onOpenChange, returnUrl = window?.location?.href || '/' }: BillingModalProps) { +export function BillingModal({ open, onOpenChange, returnUrl = typeof window !== 'undefined' ? window?.location?.href || '/' : '/' }: BillingModalProps) { const { session, isLoading: authLoading } = useAuth(); const [subscriptionData, setSubscriptionData] = useState(null); const [isLoading, setIsLoading] = useState(true); diff --git a/frontend/src/components/thread/chat-input/chat-snack.tsx b/frontend/src/components/thread/chat-input/chat-snack.tsx index e73ce1b3..77c78a84 100644 --- a/frontend/src/components/thread/chat-input/chat-snack.tsx +++ b/frontend/src/components/thread/chat-input/chat-snack.tsx @@ -1,3 +1,5 @@ +'use client'; + import React from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { X } from 'lucide-react';