diff --git a/app/auth/page.tsx b/app/auth/page.tsx index 3fe7048f..dfe81e0f 100644 --- a/app/auth/page.tsx +++ b/app/auth/page.tsx @@ -26,6 +26,13 @@ function AuthContent() { const authError = searchParams.get('error'); const authSuccess = searchParams.get('success'); + // Redirect if user is already logged in + useEffect(() => { + if (user) { + router.replace(redirectTo); + } + }, [user, router, redirectTo]); + // Check if Supabase is configured const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL; const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY; @@ -69,7 +76,7 @@ NEXT_PUBLIC_SUPABASE_ANON_KEY=your_key`} ); } - if (loading || user) { + if (loading) { return (
diff --git a/app/layout.tsx b/app/layout.tsx index 9a1df371..58937ff9 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -12,7 +12,6 @@ import { Analytics } from '@vercel/analytics/react'; import './globals.css'; import { CookieConsentBanner } from '@/components/ui/cookie-consent-banner'; import { QueryProvider } from '@/lib/query-client'; -import { AnalyticsScripts } from '@/components/analytics-scripts'; export const viewport: Viewport = { themeColor: '#0D0D10', @@ -22,34 +21,62 @@ export const viewport: Viewport = { }; export const metadata: Metadata = { - title: 'ZapDev - Build Amazing Apps with AI', + metadataBase: new URL('https://zapdev.link'), + title: { + default: 'ZapDev: AI-Powered Development Platform to Build and Deploy Web Apps', + template: '%s | ZapDev', + }, description: - 'The most powerful AI-driven development platform. Generate, preview, and deploy beautiful applications in seconds.', + 'ZapDev is an innovative AI-driven platform that empowers you to generate, preview, and deploy stunning web applications in seconds. Turn your ideas into reality with our cutting-edge AI assistant and WebContainer technology.', generator: 'ZapDev', applicationName: 'ZapDev', - keywords: ['AI development', 'web apps', 'code generation', 'WebContainer', 'AI assistant'], - authors: [{ name: 'ZapDev Team' }], - metadataBase: new URL('https://zapdev.link'), + keywords: [ + 'AI development', + 'web apps', + 'code generation', + 'WebContainer', + 'AI assistant', + 'AI developer tools', + 'no-code', + 'low-code', + 'application builder', + 'deploy web apps', + 'AI website builder', + ], + authors: [{ name: 'ZapDev Team', url: 'https://zapdev.link' }], + creator: 'ZapDev', + publisher: 'ZapDev', openGraph: { - type: 'website', - locale: 'en_US', - title: 'ZapDev - Build Amazing Apps with AI', + title: 'ZapDev: AI-Powered Development Platform', description: - 'The most powerful AI-driven development platform. Generate, preview, and deploy beautiful applications in seconds.', + 'Generate, preview, and deploy stunning web applications in seconds with our AI-driven development platform.', + url: 'https://zapdev.link', siteName: 'ZapDev', + locale: 'en_US', + type: 'website', }, twitter: { card: 'summary_large_image', - title: 'ZapDev - Build Amazing Apps with AI', + title: 'ZapDev: AI-Powered Development Platform', description: - 'The most powerful AI-driven development platform. Generate, preview, and deploy beautiful applications in seconds.', + 'Generate, preview, and deploy stunning web applications in seconds with our AI-driven development platform.', + }, + robots: { + index: true, + follow: true, + googleBot: { + index: true, + follow: true, + 'max-video-preview': -1, + 'max-image-preview': 'large', + 'max-snippet': -1, + }, }, icons: { + icon: '/favicon.svg', shortcut: '/favicon.svg', }, - formatDetection: { - telephone: false, - }, + manifest: '/site.webmanifest', }; const inter = Inter({ @@ -60,8 +87,6 @@ const inter = Inter({ fallback: ['system-ui', 'arial'], }); - - export default function RootLayout({ children, }: Readonly<{ @@ -71,6 +96,18 @@ export default function RootLayout({ +