File size: 379 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import config from '@automattic/calypso-config';
import page, { type Callback } from '@automattic/calypso-router';
import { GoldenTokenDialog } from './golden-token-dialog';

export const goldenTokenContext: Callback = ( context, next ) => {
	if ( ! config.isEnabled( 'jetpack/golden-token' ) ) {
		page.redirect( '/' );
	}

	context.primary = <GoldenTokenDialog />;
	next();
};