* Restore onboarding modal Revert 5ba8b3a396895ecec083c5258aaf9084d584a7c4 * Change greeting elephant graphic, fix up some design issues * Fix wrong link color in onboarding modal
		
			
				
	
	
		
			15 lines
		
	
	
		
			403 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			403 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import { openModal } from './modal';
 | |
| import { changeSetting, saveSettings } from './settings';
 | |
| 
 | |
| export function showOnboardingOnce() {
 | |
|   return (dispatch, getState) => {
 | |
|     const alreadySeen = getState().getIn(['settings', 'onboarded']);
 | |
| 
 | |
|     if (!alreadySeen) {
 | |
|       dispatch(openModal('ONBOARDING'));
 | |
|       dispatch(changeSetting(['onboarded'], true));
 | |
|       dispatch(saveSettings());
 | |
|     }
 | |
|   };
 | |
| };
 |