diff --git a/apps/mail/components/home/footer.tsx b/apps/mail/components/home/footer.tsx index c00764e01..d2151ba87 100644 --- a/apps/mail/components/home/footer.tsx +++ b/apps/mail/components/home/footer.tsx @@ -27,16 +27,22 @@ export default function Footer() { const isInView = useInView(ref, { once: true, margin: '-100px' }); return ( -
+
{/*
*/} -
- logo -
-
+
+ logo +
+
@@ -44,10 +50,9 @@ export default function Footer() { initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.5 }} - className="inline-block text-white lg:bg-gradient-to-b lg:from-[#84878D] lg:via-[#84878D] lg:to-[#1A1A1A] lg:bg-clip-text text-center text-2xl sm:text-4xl md:text-5xl font-bold lg:text-transparent lg:text-8xl" + className="inline-block text-center text-2xl font-bold text-white sm:text-4xl md:text-5xl lg:bg-gradient-to-b lg:from-[#84878D] lg:via-[#84878D] lg:to-[#1A1A1A] lg:bg-clip-text lg:text-8xl lg:text-transparent" > Experience the Future of
- Email Today
@@ -55,10 +60,11 @@ export default function Footer() { initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.5, delay: 0.2 }} - className="hidden md:flex flex-col items-center justify-start" + className="hidden flex-col items-center justify-start md:flex" > -
- Get started and see how 0.email helps you process your inbox in a fraction of the time. +
+ Get started and see how 0.email helps you process your inbox in a fraction of the + time.
Promise; - attach: (params: { productId: string; successUrl: string; authUrl?: string }) => Promise; - track: (params: TrackParams) => Promise; - openBillingPortal: () => Promise; - isPro: boolean; - chatMessages: FeatureState; - connections: FeatureState; - brainActivity: FeatureState; -}; - const DEFAULT_FEATURES: Features = { chatMessages: { total: 0, @@ -86,13 +55,14 @@ const FEATURE_IDS = { const PRO_PLANS = ['pro-example', 'pro_annual', 'team', 'enterprise'] as const; -export const useBilling = (): BillingHook => { +export const useBilling = () => { const { customer, refetch } = useCustomer(); + console.log('customer', customer); const { attach, track, openBillingPortal } = useAutumn(); const isPro = useMemo(() => { if (!customer?.products || !Array.isArray(customer.products)) return false; - return customer.products.some((product: Product) => + return customer.products.some((product) => PRO_PLANS.some((plan) => product.id?.includes(plan) || product.name?.includes(plan)), ); }, [customer]); diff --git a/apps/mail/lib/site-config.ts b/apps/mail/lib/site-config.ts index 4f4d3ee1d..6344712fd 100644 --- a/apps/mail/lib/site-config.ts +++ b/apps/mail/lib/site-config.ts @@ -48,5 +48,5 @@ export const siteConfig = { 'Email Service', 'Web Application', ], - metadataBase: new URL(import.meta.env.VITE_PUBLIC_APP_URL!), + // metadataBase: new URL(import.meta.env.VITE_PUBLIC_APP_URL!), }; diff --git a/apps/mail/wrangler.jsonc b/apps/mail/wrangler.jsonc index 7bebf4312..8c3bc5e33 100644 --- a/apps/mail/wrangler.jsonc +++ b/apps/mail/wrangler.jsonc @@ -4,4 +4,11 @@ "compatibility_date": "2025-05-01", "compatibility_flags": ["nodejs_compat"], "main": "./worker.ts", + "observability": { + "enabled": true, + }, + "vars": { + "VITE_PUBLIC_BACKEND_URL": "https://sapi.0.email", + "VITE_PUBLIC_APP_URL": "https://app.0.email", + }, } diff --git a/apps/server/src/routes/chat.ts b/apps/server/src/routes/chat.ts index 1ec7d5f45..013d0c12c 100644 --- a/apps/server/src/routes/chat.ts +++ b/apps/server/src/routes/chat.ts @@ -3,6 +3,7 @@ import { getActiveConnection } from '../lib/server-utils'; import { streamText, generateObject, tool } from 'ai'; import { getContext } from 'hono/context-storage'; import type { HonoContext } from '../ctx'; +import { env } from 'cloudflare:workers'; import { openai } from '@ai-sdk/openai'; import { tools } from './agent/tools'; import { Autumn } from 'autumn-js'; @@ -33,7 +34,7 @@ export const chatHandler = async () => { if (!session) return c.json({ error: 'Unauthorized' }, 401); console.log('Checking chat permissions for user:', session.user.id); - const canSendMessages = await Autumn.check({ + const canSendMessages = await new Autumn({ secretKey: env.AUTUMN_SECRET_KEY }).check({ feature_id: 'chat-messages', customer_id: session.user.id, });