Add example for turn by turn directions app (#100)

This commit is contained in:
Brian Hackett 2025-04-06 15:52:27 -07:00 committed by GitHub
parent eef6181fd7
commit 721fddf191
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,10 @@
import React from 'react';
const EXAMPLE_PROMPTS = [
{ text: 'Build a todo app in React' },
{ text: 'Build a turn by turn directions app',
full: 'build an app to get turn by turn directions using the OpenStreetMap API. the directions should be in a clean and easy to read format showing a small map of the turn next to each step. do not show any complete map for the entire route. make sure the directions work on real locations, e.g. getting from santa cruz to san francisco should take about an hour and a half'
},
{ text: 'Build a todo app' },
{ text: 'Build a simple blog' },
{ text: 'Make a space invaders game' },
];
@ -20,7 +23,7 @@ export function ExamplePrompts(sendMessage?: { (event: React.UIEvent, messageInp
<button
key={index}
onClick={(event) => {
sendMessage?.(event, examplePrompt.text);
sendMessage?.(event, examplePrompt.full ?? 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-theme"
>