Skip to content

Commit ba845a2

Browse files
committed
Added fix for routes in doc and error handling
1 parent 5b0c810 commit ba845a2

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

docs/client/components/PlaygroundPage/PlaygroundWithPreview/Preview.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ class Preview extends React.Component {
7676
}
7777

7878
render () {
79-
console.log('theme ', theme);
79+
if (this.state.error) {
80+
return (
81+
<div className={styles.error}>
82+
{this.state.error}
83+
</div>
84+
)
85+
}
8086
return (
8187
<div className={styles.preview}>
8288
<div ref="mount" />

docs/client/components/PlaygroundPage/PlaygroundWithPreview/styles.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,11 @@
3535
width: 35%;
3636
height: 100%;
3737
}
38+
39+
:local(.error) {
40+
position: fixed;
41+
left: 60%;
42+
width: 35%;
43+
height: 100%;
44+
color: red;
45+
}

docs/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
</head>
88
<body>
99
<div id="app"></div>
10-
<script src="./docs.js"></script>
10+
<script src="/docs.js"></script>
1111
</body>
1212
</html>

0 commit comments

Comments
 (0)