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 (
What would you like to build today?
Try one of these examples to get started:
Logged in as{' '} @{authState.user.username}