diff --git a/public/_headers b/public/_headers
index 45955f2..2f2954f 100644
--- a/public/_headers
+++ b/public/_headers
@@ -5,7 +5,7 @@
Cache-Control: public, max-age=86400
/
- Cache-Control: public, max-age=120
+ Cache-Control: public, max-age=120
/?src=pwa
- Cache-Control: public, max-age=120
\ No newline at end of file
+ Cache-Control: public, max-age=120
\ No newline at end of file
diff --git a/src/App.js b/src/App.js
index c95620f..2ea9012 100644
--- a/src/App.js
+++ b/src/App.js
@@ -12,6 +12,8 @@ class App extends Component {
search_text: null,
flow_render_key: +new Date(),
};
+ this.show_sidebar_bound=this.show_sidebar.bind(this);
+ this.set_search_text_bound=this.set_search_text.bind(this);
}
show_sidebar(title,content) {
@@ -34,10 +36,10 @@ class App extends Component {
-
+
diff --git a/src/Common.js b/src/Common.js
index 94b2bf1..eab7a54 100644
--- a/src/Common.js
+++ b/src/Common.js
@@ -1,4 +1,4 @@
-import React, {Component} from 'react';
+import React, {Component, PureComponent} from 'react';
import TimeAgo from 'react-timeago';
import Linkify from 'react-linkify';
@@ -36,19 +36,21 @@ export function TitleLine(props) {
)
}
-export function HighlightedText(props) {
- let parts=[].concat.apply([], props.text.split(PID_RE).map((p)=>p.split(NICKNAME_RE)));
- return (
-
-
- {parts.map((p,idx)=>(
- {
- PID_RE.test(p) ? {p} :
- NICKNAME_RE.test(p) ? {p} :
- p
- }
- ))}
-
-
- )
-}
\ No newline at end of file
+export class HighlightedText extends PureComponent {
+ render() {
+ let parts=[].concat.apply([], props.text.split(PID_RE).map((p)=>p.split(NICKNAME_RE)));
+ return (
+
+
+ {parts.map((p,idx)=>(
+ {
+ PID_RE.test(p) ? {p} :
+ NICKNAME_RE.test(p) ? {p} :
+ p
+ }
+ ))}
+
+
+ )
+ }
+}
diff --git a/src/Flows.js b/src/Flows.js
index e37ad9f..e2b71cc 100644
--- a/src/Flows.js
+++ b/src/Flows.js
@@ -1,4 +1,4 @@
-import React, {Component} from 'react';
+import React, {Component, PureComponent} from 'react';
import {ColorPicker} from './color_picker';
import {Time, TitleLine, HighlightedText} from './Common.js';
import './Flows.css';
@@ -46,7 +46,7 @@ function FlowItem(props) {
);
}
-class FlowItemRow extends Component {
+class FlowItemRow extends PureComponent {
constructor(props) {
super(props);
this.state={
@@ -156,7 +156,7 @@ function FlowChunk(props) {
);
}
-export class Flow extends Component {
+export class Flow extends PureComponent {
constructor(props) {
super(props);
this.state={
@@ -222,8 +222,8 @@ export class Flow extends Component {
chunks: [{
title: 'Result for "'+this.state.search_param+'"',
data: json.data,
- mode: finished ? 'search_finished' : 'search',
}],
+ mode: finished ? 'search_finished' : 'search',
loading_status: 'done',
});
})
diff --git a/src/Title.js b/src/Title.js
index 741b657..1a6a22d 100644
--- a/src/Title.js
+++ b/src/Title.js
@@ -1,4 +1,4 @@
-import React, {Component} from 'react';
+import React, {Component, PureComponent} from 'react';
import './Title.css';
const HELP_TEXT=(
@@ -39,7 +39,7 @@ const HELP_TEXT=(
);
-class ControlBar extends Component {
+class ControlBar extends PureComponent {
constructor(props) {
super(props);
this.state={