File size: 487 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import { withStorageKey } from '@automattic/state-utils';
import { GUTENBERG_IFRAME_ELIGIBLE_SET } from 'calypso/state/action-types';
import { keyedReducer } from 'calypso/state/utils';

export const gutenbergIframeEligible = ( state, { type, isEligibleForGutenframe } ) =>
	type === GUTENBERG_IFRAME_ELIGIBLE_SET ? isEligibleForGutenframe : state;

const reducer = keyedReducer( 'siteId', gutenbergIframeEligible );

export default withStorageKey( 'gutenbergIframeEligible', reducer );