How to use the modernizr.flexwrap function in modernizr

To help you get started, we’ve selected a few modernizr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 1ven / do / client / routes.js View on Github external
import React from 'react';
import cookie from 'js-cookie';
import Modernizr from 'modernizr';
import { Route, IndexRoute } from 'react-router';
import Sign from './components/Sign';
import UpdateMessage from './components/UpdateMessage';
import AppContainer from './containers/AppContainer';
import IndexPage from './containers/pages/IndexPage';
import BoardPage from './containers/pages/BoardPage';
import SignInPage from './containers/pages/SignInPage';
import SignUpPage from './containers/pages/SignUpPage';
import FullCardModal from './containers/modals/FullCardModal';
import { setPageIndex } from './actions/boardsActions';

const isFlexboxSupported = Modernizr.flexbox && Modernizr.flexwrap;

function ensureSignedIn(nextState, replace) {
  if (!cookie.get('authenticated')) {
    replace('/sign-in');
  }
}

function ensureSignedOut(nextState, replace) {
  if (cookie.get('authenticated')) {
    replace('/');
  }
}

function ensureBrowserIsUpdated(nextState, replace) {
  if (!isFlexboxSupported) {
    replace('/update');