import { useSelect } from '@wordpress/data';
export const PreviewType = () => {
const { deviceType } = useSelect( ( select ) => {
return {
deviceType: select( 'core/edit-post' )?.__experimentalGetPreviewDeviceType() || 'Desktop',
};
}, [] );
return deviceType || '';
};