| 9 | |
| 10 | interface ProgramFormData { |
| 11 | name: string |
| 12 | notes: string |
| 13 | days: DayDraft[] |
| 14 | } |
| 15 | |
| 16 | export default function AddProgram() { |
| 17 | const navigate = useNavigate() |
| 18 | const { settings } = useSettingsStore() |
| 19 | const wUnit = weightShort(settings.weight_unit) |
| 20 | // `error` is for what the FORM can tell the user before anything is sent (a missing |
| 21 | // name, an empty day). What the SERVER says lives on the hook below — different |
| 22 | // questions, kept apart on purpose, and rendered in the same place. |
| 23 | const [error, setError] = useState('') |
nothing calls this directly
no outgoing calls
no test coverage detected