I'm having an issue where useEffect isn't triggering a re-render based on useState changing or useState isn't changing which isn't triggering useEffect. I noticed this issue once I selected an asset that should update useState as the selected component and then I select another its no problem but once I select an asset that has already been selected.. nothing happens? Any suggestions or anything is greatly appreciated!! Thanks!
export default function SingleAsset({svg, name, size = '60', group}) {
  const [assetType, setAssetType] = React.useState(null);
  const [officeType, setOfficeType] = React.useState(null);
  const [industrialType, setIndustrialType] = React.useState(null);
  const [financingType, setFinancingType] = React.useState(null);
  const [investmentType, setInvestmentType] = React.useState(null)
  const acquistionStatus = useSelector(state => state.Acquisition)
  const dispatch = useDispatch()
  const classes = useStyles()
  React.useEffect(() => {
    if(financingType === 'Acquisition') {
      const data = {financingType}
      dispatch(updateFormData(data))
      dispatch(toggleAcquisitionOn())
    }
    if(financingType) {
      if(financingType !== 'Acquisition')  dispatch(toggleAcquisitionOff())
      const data = {financingType}
      dispatch(updateFormData(data))
      
    }
    if(industrialType) {
      const data = {industrialType}
      dispatch(updateFormData(data))
    }
    if(officeType) {
      const data = {officeType}
      dispatch(updateFormData(data))
    }
    if(investmentType) {
      const data = {investmentType}
      dispatch(updateFormData(data))
      console.log(data)
    }
    if(assetType) dispatch(updateAssetData(assetType))
    console.log(financingType)
    console.log(officeType)
    console.log(industrialType)
    console.log(investmentType)
    
  },[investmentType,assetType,officeType,industrialType,financingType])
  const handleSelect = (group, name) => {
    switch(group) {
      case 'main':
        setAssetType(name)
        break
      case 'office': 
        setOfficeType(name)
        break
      case 'industrial':
        setIndustrialType(name)
        break
      case 'financing':
        setFinancingType(name)
        break
      case 'investment':
        setInvestmentType(name)
        break
      default:
        throw new Error('group not found')
    }
  }
  return (
    <Grid
      className={classes.container} 
      item
    >
      <Grid
        container
        direction="column"
        alignItems="center"
      >
        <IconButton onClick={() => handleSelect(group, name)}>
          <img src={svg} color="white" height={size} />
        </IconButton>
        <Typography 
          variant="body1" 
          color="white" 
          align="center"
        >
          {name}
        </Typography>
      </Grid>
    </Grid>         
  )
}
 
    