Trim user input

#7
by kramp HF staff - opened
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") {