@@ -15,7 +15,6 @@ const SkillsStep = ({ formData, onInputChange }) => {
1515 const file = e . target . files [ 0 ] ;
1616 if ( ! file ) return ;
1717
18-
1918 const error = validateFile ( file , 'DOCUMENT' ) ;
2019 if ( error ) {
2120 setErrors ( prev => ( { ...prev , document : error } ) ) ;
@@ -24,17 +23,17 @@ const SkillsStep = ({ formData, onInputChange }) => {
2423
2524 try {
2625 setUploading ( true ) ;
27-
2826 const formDataObj = new FormData ( ) ;
2927 formDataObj . append ( 'document' , file ) ;
3028
3129 const response = await api . post ( '/documents/upload-document' , formDataObj , {
32- headers : {
33- 'Content-Type' : 'multipart/form-data' ,
34- } ,
35- } ) ;
30+ headers : {
31+ 'Content-Type' : 'multipart/form-data' ,
32+ } ,
33+ } ) ;
3634
3735 console . log ( 'Document upload response:' , response ) ;
36+
3837 if ( response . data . success ) {
3938 const newDocument = {
4039 id : Date . now ( ) ,
@@ -90,7 +89,6 @@ const SkillsStep = ({ formData, onInputChange }) => {
9089 rows = { 6 }
9190 />
9291 </ div >
93-
9492 </ div >
9593
9694 < p className = "text-sm text-gray-600 bg-blue-50 p-3 rounded-lg" >
@@ -164,6 +162,14 @@ const SkillsStep = ({ formData, onInputChange }) => {
164162 </ div >
165163
166164 < div className = "flex items-center gap-2" >
165+ < a
166+ href = { doc . url }
167+ target = "_blank"
168+ rel = "noopener noreferrer"
169+ className = "text-xs text-[#169AB4] hover:text-[#147a8f] underline"
170+ >
171+ View
172+ </ a >
167173 < button
168174 onClick = { ( ) => removeDocument ( doc . id ) }
169175 className = "p-1 text-red-500 hover:bg-red-50 rounded"
@@ -179,7 +185,6 @@ const SkillsStep = ({ formData, onInputChange }) => {
179185 ) }
180186 </ div >
181187 </ div >
182-
183188 </ div >
184189 ) ;
185190} ;
0 commit comments