|
1 | 1 | import { ISettingRegistry } from '@jupyterlab/coreutils';
|
| 2 | +import { FileBrowserModel } from '@jupyterlab/filebrowser'; |
2 | 3 | import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
|
3 | 4 | import * as React from 'react';
|
4 | 5 | import { GitExtension } from '../model';
|
5 |
| -import { |
6 |
| - findRepoButtonStyle, |
7 |
| - panelContainerStyle, |
8 |
| - panelWarningStyle |
9 |
| -} from '../style/GitPanelStyle'; |
| 6 | +import { panelContainerStyle } from '../style/GitPanelStyle'; |
10 | 7 | import { Git } from '../tokens';
|
11 | 8 | import { decodeStage } from '../utils';
|
12 | 9 | import { BranchHeader } from './BranchHeader';
|
13 | 10 | import { FileList } from './FileList';
|
14 | 11 | import { HistorySideBar } from './HistorySideBar';
|
15 | 12 | import { PathHeader } from './PathHeader';
|
16 |
| -import { FileBrowserModel } from '@jupyterlab/filebrowser'; |
17 | 13 |
|
18 | 14 | /** Interface for GitPanel component state */
|
19 | 15 | export interface IGitSessionNodeState {
|
@@ -163,7 +159,7 @@ export class GitPanel extends React.Component<
|
163 | 159 | };
|
164 | 160 |
|
165 | 161 | render() {
|
166 |
| - let main: React.ReactElement; |
| 162 | + let main: React.ReactElement = null; |
167 | 163 | let sub: React.ReactElement;
|
168 | 164 |
|
169 | 165 | if (this.state.isHistoryVisible) {
|
@@ -212,20 +208,6 @@ export class GitPanel extends React.Component<
|
212 | 208 | {sub}
|
213 | 209 | </React.Fragment>
|
214 | 210 | );
|
215 |
| - } else { |
216 |
| - main = ( |
217 |
| - <div className={panelWarningStyle}> |
218 |
| - <div>You aren’t in a git repository.</div> |
219 |
| - <button |
220 |
| - className={findRepoButtonStyle} |
221 |
| - onClick={() => |
222 |
| - this.props.model.commands.execute('filebrowser:toggle-main') |
223 |
| - } |
224 |
| - > |
225 |
| - Go find a repo |
226 |
| - </button> |
227 |
| - </div> |
228 |
| - ); |
229 | 211 | }
|
230 | 212 |
|
231 | 213 | return (
|
|
0 commit comments