Skip to content

Commit

Permalink
fix: remove data server from build
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Mar 29, 2019
1 parent 84b23ea commit 8715129
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/docz-core/templates/root.tpl.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { Link, Router, Routes, useDataServer } from 'docz'
import { Link, Router, Routes<% if (isProd) {%>, useDataServer<%}%> } from 'docz'
<% if (!isProd) {%>import { hot } from 'react-hot-loader'<%}%>
import Theme from '<%- theme %>'

Expand All @@ -8,7 +8,7 @@ import database from './db.json'
<% if (wrapper) {%>import Wrapper from '<%- wrapper %>'<%}%>

const Root = () => {
<% if (websocketUrl) {%>useDataServer('<%- websocketUrl %>')<%}%>
<% if (websocketUrl || isProd) {%>useDataServer('<%- websocketUrl %>')<%}%>
return (
<Theme
<% if (wrapper) {%>wrapper={Wrapper}<%}%>
Expand Down

0 comments on commit 8715129

Please sign in to comment.