import React from 'react'; import { useStore } from '@nanostores/react'; import { authStore } from '~/lib/stores/auth'; import { motion } from 'framer-motion'; const EXAMPLE_PROMPTS = [ { text: 'Create a mobile app about bolt.diy' }, { text: 'Build a todo app in React using Tailwind' }, { text: 'Build a simple blog using Astro' }, { text: 'Create a cookie consent form using Material UI' }, { text: 'Make a space invaders game' }, { text: 'Make a Tic Tac Toe game in html, css and js only' }, ]; interface WelcomeMessageProps { sendMessage?: (event: React.UIEvent, messageInput?: string) => void; } export function WelcomeMessage({ sendMessage }: WelcomeMessageProps) { const authState = useStore(authStore); const timeOfDay = new Date().getHours(); const getGreeting = () => { if (timeOfDay < 12) { return 'Good morning'; } if (timeOfDay < 17) { return 'Good afternoon'; } return 'Good evening'; }; return (
{/* Personalized Greeting */}

{getGreeting()}, {authState.user?.firstName || 'Developer'}!

What would you like to build today?

{/* Example Prompts */}

Try one of these examples to get started:

{EXAMPLE_PROMPTS.map((examplePrompt, index) => ( sendMessage?.(event, examplePrompt.text)} className="border border-bolt-elements-borderColor rounded-full bg-gray-50 hover:bg-gray-100 dark:bg-gray-950 dark:hover:bg-gray-900 text-bolt-elements-textSecondary hover:text-bolt-elements-textPrimary px-3 py-1 text-xs transition-all hover:scale-105" > {examplePrompt.text} ))}
{/* User Stats */} {authState.user && (

Logged in as{' '} @{authState.user.username}

)}
); }