© 2026 Hedgehog Software, LLC
export default async function BotCommandsSection() { const commands: BotCommandsResponse = await fetch( `${BASE_URL}/api/commands` ).then((res) => res.json()); console.log({ commands }); if ('error' in commands) { return <p>{commands.error}</p>; } return commands.map((command) => ( <BotCommandInfo data={command} key={command.id} /> )); }
Error: Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead.