Skip to content

Commit 0af3bf9

Browse files
committed
Fix lint errors
1 parent f9c7744 commit 0af3bf9

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

src/components/app/BottomBox.tsx

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ class BottomBoxImpl extends React.PureComponent<Props> {
179179
? assemblyViewCode.instructions
180180
: [];
181181
const sourceIsIonGraph = path !== null && path.endsWith('iongraph.json');
182+
const displaySourceView = sourceViewFile !== null && !sourceIsIonGraph;
183+
const displayIonGraph = sourceViewFile !== null && sourceIsIonGraph;
182184

183185
// The bottom box has one or more side-by-side panes.
184186
// At the moment it always has either one or two panes:
@@ -213,24 +215,23 @@ class BottomBoxImpl extends React.PureComponent<Props> {
213215
{assemblyViewIsOpen ? null : trailingHeaderButtons}
214216
</div>
215217
<div className="bottom-sourceview-wrapper">
216-
{sourceViewFile !== null ? (
217-
sourceIsIonGraph ? (
218-
<IonGraphView
219-
timings={globalLineTimings}
220-
hotSpotTimings={selectedCallNodeLineTimings}
221-
sourceCode={sourceCode}
222-
/>
223-
) : (
224-
<SourceView
225-
disableOverscan={disableOverscan}
226-
timings={globalLineTimings}
227-
sourceCode={sourceCode}
228-
filePath={path}
229-
scrollToHotSpotGeneration={sourceViewScrollGeneration}
230-
hotSpotTimings={selectedCallNodeLineTimings}
231-
ref={this._sourceView}
232-
/>
233-
)
218+
{displayIonGraph ? (
219+
<IonGraphView
220+
timings={globalLineTimings}
221+
hotSpotTimings={selectedCallNodeLineTimings}
222+
sourceCode={sourceCode}
223+
/>
224+
) : null}
225+
{displaySourceView ? (
226+
<SourceView
227+
disableOverscan={disableOverscan}
228+
timings={globalLineTimings}
229+
sourceCode={sourceCode}
230+
filePath={path}
231+
scrollToHotSpotGeneration={sourceViewScrollGeneration}
232+
hotSpotTimings={selectedCallNodeLineTimings}
233+
ref={this._sourceView}
234+
/>
234235
) : null}
235236
{sourceViewCode !== undefined &&
236237
sourceViewCode.type === 'LOADING' ? (

src/components/shared/IonGraphView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type IonGraphViewProps = {
1717
};
1818

1919
export function IonGraphView(props: IonGraphViewProps) {
20-
let func = useMemo(() => {
20+
const func = useMemo(() => {
2121
if (props.sourceCode.trim() === '') {
2222
return null;
2323
}

0 commit comments

Comments
 (0)