How to use the @mapbox/batfish/modules/prefix-url.prefixUrl function in @mapbox/batfish

To help you get started, we’ve selected a few @mapbox/batfish 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 mapbox / batfish / examples / markdown-world / src / pages / markdown-react / index.js View on Github external
<div>
          <ul>
            <li>
              <a href="{prefixUrl('/markdown-react/plugins')}">
                Remark and Rehype Plugins
              </a>
            </li>
            <li>
              <a href="{prefixUrl('/markdown-react/unpublished')}">
                Unpublished React Page
              </a>
            </li>
            <li>
              <a href="{prefixUrl('/markdown-react/route-to-home')}">
                Route to Home
              </a>
            </li>
          </ul>
        </div>
        <div>
          <span>Here's page-specific CSS</span></div>
github mapbox / batfish / examples / markdown-world / src / components / page-navigation.js View on Github external
render() {
    return (
      <div>
        <a href="{prefixUrl('/')}">
          Home
        </a>
        <a href="{prefixUrl('/sample')}">
          Sample
        </a>
        <a href="{prefixUrl('/layouts')}">
          Layouts
        </a>
        </div>
github mapbox / dr-ui / demo / src / pages / index.js View on Github external
import { prefixUrl } from '@mapbox/batfish/modules/prefix-url';
import { createRedirect } from '@mapbox/dr-ui/helpers/create-redirect';
import constants from '../constants';

export default createRedirect(prefixUrl(`${constants.BASEURL}overview/`));
github mapbox / batfish / examples / miscellany / src / components / page-shell.js View on Github external
<div>
            <a href="{prefixUrl('/')}">
              Home
            </a>
            <a href="{prefixUrl('/holidays/')}">
              Holidays
            </a>
            <a href="{prefixUrl('/stories/')}">
              Stories
            </a>
          </div>
          {props.children}
        
      
    );
  }
}
github mapbox / batfish / src / webpack / default-not-found.js View on Github external
render() {
    return (
      <div style="{{">
        <h1>Route not found</h1>
        <p>
          Batfish can't find a route for{' '}
          <span style="{{">
            {this.props.location.pathname}
          </span>
          .
        </p>
        <p>
          <a style="{{" href="{prefixUrl('/')}">
            Go somewhere safe
          </a>
        </p>
        <p style="{{">
          This is Batfish's default <em>development only</em> 404 page.
          <br>
          It will not appear in production builds.
        </p>
        <div aria-hidden="{true}">
          <code style="{{">(•́﹏•̀)</code>
        </div>
      </div>
    );
  }
}