mirror of
				https://github.com/graphql-python/graphene.git
				synced 2025-10-31 16:07:27 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			468 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			468 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| exports.loadContext = function(callback) {
 | |
|   var context;
 | |
|   context = require.context('./pages', true);
 | |
|   if (module.hot) {
 | |
|     module.hot.accept(context.id, function() {
 | |
|       context = require.context('./pages', true);
 | |
|       return callback(context);
 | |
|     });
 | |
|   }
 | |
|   return callback(context);
 | |
| };
 | |
| 
 | |
| exports.onRouteChange = function(state) {
 | |
|   if (typeof window !== "undefined" && window.ga) {
 | |
|     window.ga('send', 'pageview', {
 | |
|       page: state.pathname
 | |
|     });
 | |
|   }
 | |
| }
 |