@@ -60,10 +60,8 @@ function FeedbackRequestForm() {
6060 const [ opened , { open, close } ] = useDisclosure ( false ) ;
6161
6262 const form = useForm ( {
63- initialValues : { name : "" , topicOfLearningSession : null , codeLink : "" } ,
63+ initialValues : { topicOfLearningSession : null , codeLink : "" } ,
6464 validate : {
65- name : ( value ) =>
66- value . length < 3 ? "Name must have at least 3 letters" : null ,
6765 topicOfLearningSession : ( value ) =>
6866 topics . some ( ( item ) => value ?. includes ( item ) )
6967 ? null
@@ -74,10 +72,11 @@ function FeedbackRequestForm() {
7472 const handleSubmitRequest = ( ) => {
7573 dispatch ( createFeedbackRequest ( form . values ) ) ;
7674 dispatch ( fetchFeedbackRequests ( ) ) ;
75+
7776 if ( loading === "succeeded" ) {
7877 open ( )
7978 }
80- form . setValues ( { name : "" , topicOfLearningSession : null , codeLink : "" } ) ;
79+ form . setValues ( { topicOfLearningSession : null , codeLink : "" } ) ;
8180 } ;
8281
8382 return (
@@ -100,14 +99,6 @@ function FeedbackRequestForm() {
10099 Request Feedback
101100 </ Text >
102101 < div style = { formStyle } >
103- < TextInput
104- variant = "filled"
105- style = { inputStyle }
106- id = "internName"
107- label = "Intern Name"
108- placeholder = "Enter intern's name"
109- { ...form . getInputProps ( "name" ) }
110- />
111102 < Select
112103 label = "Topic of Learning Session"
113104 placeholder = "Select the topic of the learning session"
0 commit comments