Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the react-perf query to the iframe #623

Merged
merged 2 commits into from
Nov 22, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dist/client/manager/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ var ReactProvider = function (_Provider) {
selectedStory: selectedStory
};

// Add the react-perf query string to the iframe if that present.
if (/react-perf=/.test(location.search)) {
queryParams['react-perf'] = '1';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be react_perf (underscore rather than dash)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh my.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it's working after the change.

}

var queryString = _qs2.default.stringify(queryParams);
var url = 'iframe.html?' + queryString;
return _react2.default.createElement(_preview2.default, { url: url });
Expand Down
5 changes: 5 additions & 0 deletions src/client/manager/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export default class ReactProvider extends Provider {
selectedStory,
};

// Add the react-perf query string to the iframe if that present.
if (/react-perf=/.test(location.search)) {
queryParams['react-perf'] = '1';
}

const queryString = qs.stringify(queryParams);
const url = `iframe.html?${queryString}`;
return (
Expand Down
Loading