mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-13 13:16:49 +03:00
Improved Playground. Added document title.
This commit is contained in:
parent
45c52cdb70
commit
9a767aa5da
|
@ -1 +1,13 @@
|
||||||
module.exports = require('playground-wrapper');
|
import React from 'react';
|
||||||
|
import DocumentTitle from 'react-document-title';
|
||||||
|
import PlaygroundWrapper from 'playground-wrapper';
|
||||||
|
|
||||||
|
class Playground extends React.Component {
|
||||||
|
render() {
|
||||||
|
return <DocumentTitle title="Playground - Graphene">
|
||||||
|
<PlaygroundWrapper />
|
||||||
|
</DocumentTitle>;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = Playground;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
// require.ensure([], function(require) {
|
import React from 'react';
|
||||||
// require.include('../playground/page');
|
|
||||||
// });
|
class PlaygroundWrapper extends React.Component {
|
||||||
var React = require('react');
|
|
||||||
class App extends React.Component {
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.state = { currentComponent: null };
|
this.state = { currentComponent: null };
|
||||||
|
@ -19,4 +17,5 @@ class App extends React.Component {
|
||||||
return Current?<Current />:null;
|
return Current?<Current />:null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
module.exports = App;
|
|
||||||
|
module.exports = PlaygroundWrapper;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user