 
   handleButtonClick: ->
 
+    { router } = kd.singletons
+    currentPath = router.getCurrentPath()
+    newPath = "/IDE/#{@props.machine.get('slug')}"
+
     @removeFromStore()
+    router.handleRoute newPath  unless newPath is currentPath
+
+
+  componentWillMount: ->
+
     kd.singletons.router.handleRoute "/IDE/#{@props.machine.get('slug')}"
 
 

    connectedManagedMachine: EnvironmentFlux.getters.connectedManagedMachine


  removeFromStore: ->

    kd.utils.defer =>


    provider = if PROVIDERS[connectedMachine.providerName] then connectedMachine.providerName else 'UnknownProvider'

    # dashboardCloseButton = document.querySelector('.kdmodal.HomeAppView.kddraggable .close-icon')
    # console.log {dashboardCloseButton}
    # dashboardCloseButton.click()  if dashboardCloseButton


    <SidebarWidget {...@props} onClose={@bound 'onClose'}>
      <div className='header'>
        <h1>Congratulations</h1>
      </div>
      <span className='close-icon' onClick={@bound 'onClose'}></span>
      <div className='main-wrapper'>
        <div className='image-wrapper'>
        </div>
