Skip to content

Commit

Permalink
docs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnuttandrew committed Oct 18, 2023
1 parent 25b10c3 commit b813517
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/containers/docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ window.process = {cwd: () => ''};
export function DocsContainer(): JSX.Element {
const [docsText, setDocsText] = React.useState('');
useEffect(() => {
fetch('./docs/language-docs.md')
const url =
location.hostname === 'localhost'
? './docs/language-docs.md'
: 'https://raw.githubusercontent.com/mcnuttandrew/ivy/master/docs/language-docs.md';
fetch(url)
.then((x) => x.text())
.then((x) => setDocsText(x))
.catch((e) => console.error(e));
Expand Down
4 changes: 2 additions & 2 deletions src/utils/stringify.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// some dumb foot work to try to make both build and test envs happy
// eslint-disable-next-line @typescript-eslint/no-var-requires
const stringify = require('json-stringify-pretty-compact');
// import stringify from 'json-stringify-pretty-compact';
// const stringify = require('json-stringify-pretty-compact');
import stringify from 'json-stringify-pretty-compact';
export default stringify;

0 comments on commit b813517

Please sign in to comment.