chore(api): rename test function for clarity on enrollment behavior

This commit is contained in:
shay
2026-04-18 11:58:02 -04:00
parent f9c59d934d
commit 7b2301cec0
7 changed files with 239 additions and 71 deletions
+10 -1
View File
@@ -126,8 +126,17 @@ export default function App() {
setStep('workshop')
}
const handleGenerate = () => {
const handleGenerate = async () => {
setStep('result')
// Fire-and-forget: the backend renders the composite SVG from the
// fetcher's cached payload + current settings and persists it to
// widgets.db for README embeds. The Result screen itself still
// renders client-side from widgetData for immediate feedback.
try {
await fetch(`/api/${encodeURIComponent(username)}/generate`, { method: 'POST' })
} catch (e) {
console.warn('generate call failed:', e)
}
}
const handleBack = () => {