mirror of
https://github.com/trambarhq/relaks-wordpress-example.git
synced 2025-09-25 06:51:30 +02:00
Fixed text selection.
Made Breadcrumb a PureComponent.
This commit is contained in:
@@ -62,7 +62,7 @@ class FrontEnd extends PureComponent {
|
||||
|
||||
if (typeof(window) === 'object') {
|
||||
let Hammer = require('hammerjs');
|
||||
let hammer = new Hammer(document.body);
|
||||
let hammer = new Hammer(document.body, { cssProps: { userSelect: 'auto' } });
|
||||
hammer.on('swipeleft', this.handleSwipeLeft);
|
||||
hammer.on('swiperight', this.handleSwipeRight);
|
||||
}
|
||||
|
@@ -1,7 +1,10 @@
|
||||
import React from 'react';
|
||||
import React, { PureComponent } from 'react';
|
||||
|
||||
function Breadcrumb(props) {
|
||||
let { trail } = props;
|
||||
class Breadcrumb extends PureComponent {
|
||||
static displayName = 'Breadcrumb';
|
||||
|
||||
render() {
|
||||
let { trail } = this.props;
|
||||
let children = []
|
||||
let key = 0;
|
||||
for (let item of trail) {
|
||||
@@ -11,6 +14,7 @@ function Breadcrumb(props) {
|
||||
children.pop();
|
||||
return <h4 className="breadcrumb">{children}</h4>;
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
const PropTypes = require('prop-types');
|
||||
|
Reference in New Issue
Block a user