fix recommit after commit already
This commit is contained in:
		
							parent
							
								
									9b829c384c
								
							
						
					
					
						commit
						65818f1db4
					
				
					 1 changed files with 9 additions and 2 deletions
				
			
		|  | @ -30,11 +30,18 @@ function TypeDifference(prop:{ | |||
| }){ | ||||
|     const classes = useStyles(); | ||||
|     const x = prop.content; | ||||
|     const [button_disable,set_disable] = useState(false); | ||||
| 
 | ||||
|     return (<Paper className={classes.paper}> | ||||
|                     <Typography variant='h3' className={classes.contentTitle}>{x.type}</Typography> | ||||
|                         {x.value.map(y=>( | ||||
|                             <Box className={classes.commitable} key={y.path}> | ||||
|                             <Button onClick={()=>prop.onCommit(y)}>Commit</Button> | ||||
|                             <Button onClick={()=>{ | ||||
|                                 set_disable(true); | ||||
|                                 prop.onCommit(y); | ||||
|                                 set_disable(false); | ||||
|                                 }} | ||||
|                                 disabled={button_disable}>Commit</Button> | ||||
|                             <Typography variant='h5'>{y.path}</Typography> | ||||
|                     </Box> | ||||
|                             ))} | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue