Skip to content

Commit

Permalink
Fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelfangjw committed Jun 14, 2021
1 parent aaf78e8 commit d31882e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/pages/sicp/Sicp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ export const mathjaxConfig = {
}
};

const loadingComponent = (
<NonIdealState title="Loading Content" icon={<Spinner />} />
);
const loadingComponent = <NonIdealState title="Loading Content" icon={<Spinner />} />;

const unexpectedError = (
<div>
Expand Down Expand Up @@ -154,7 +152,11 @@ const Sicp: React.FC<SicpProps> = props => {
<CodeSnippetContext.Provider value={{ active: active, setActive: handleSnippetEditorOpen }}>
<div ref={topRef} />
<MathJaxContext version={3} config={mathjaxConfig}>
{loading ? <div className="sicp-content">{loadingComponent}</div> : <div className="sicp-content">{data}</div>}
{loading ? (
<div className="sicp-content">{loadingComponent}</div>
) : (
<div className="sicp-content">{data}</div>
)}
</MathJaxContext>
</CodeSnippetContext.Provider>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/sicp/__tests__/Sicp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Sicp renders', () => {
</Provider>
);
const wrapper = mount(sicp);
const display = wrapper.find(".sicp-content");
const display = wrapper.find('.sicp-content');
expect(display.prop('children')).toEqual(<SicpIndexPage />);
});
});

0 comments on commit d31882e

Please sign in to comment.