File size: 437 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import { isEnabled } from '@automattic/calypso-config';
import page from '@automattic/calypso-router';
import type { Context as PageJSContext } from '@automattic/calypso-router';
export function redirectToHostingDashboardBackportIfEnabled(
context: PageJSContext,
next: () => void
) {
if ( isEnabled( 'dashboard/v2/backport/site-settings' ) ) {
return page.redirect( `/sites/settings/v2/${ context.params.site }` );
}
next();
}
|