timqian kramp HF staff commited on
Commit
c6b2cb1
1 Parent(s): 9c54868

Trim user input (#7)

Browse files

- Trim user input (0e88dbeacad9e7352a72f42bd74df8730490186c)


Co-authored-by: Bertrand Chevrier <[email protected]>

Files changed (1) hide show
  1. src/App.js +1 -1
src/App.js CHANGED
@@ -143,7 +143,7 @@ function App() {
143
  className="block w-full rounded-md border-0 py-1.5 pl-24 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
144
  placeholder="openai/whisper-large"
145
  value={projectName}
146
- onChange={(e) => setProjectName(e.target.value)}
147
  onFocus={(e) => e.target.select()}
148
  onKeyDown={async (e) => {
149
  if (e.key === "Enter") {
 
143
  className="block w-full rounded-md border-0 py-1.5 pl-24 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
144
  placeholder="openai/whisper-large"
145
  value={projectName}
146
+ onChange={(e) => setProjectName(e.target.value.trim())}
147
  onFocus={(e) => e.target.select()}
148
  onKeyDown={async (e) => {
149
  if (e.key === "Enter") {