@@ -9,11 +9,38 @@ import {
99 installDvc ,
1010 selectPythonInterpreter ,
1111 setupWorkspace ,
12+ showExperiments ,
1213 showScmPanel
1314} from './messages'
1415import { NeedsGitCommit } from './NeedsGitCommit'
1516import { NoData } from './NoData'
1617import { EmptyState } from '../../shared/components/emptyState/EmptyState'
18+ import { IconButton } from '../../shared/components/button/IconButton'
19+ import { Beaker } from '../../shared/components/icons'
20+
21+ const ProjectSetup : React . FC < { hasData : boolean | undefined } > = ( {
22+ hasData
23+ } ) => {
24+ if ( hasData === undefined ) {
25+ return < EmptyState isFullScreen = { false } > Loading Project...</ EmptyState >
26+ }
27+
28+ if ( ! hasData ) {
29+ return < NoData />
30+ }
31+
32+ return (
33+ < EmptyState isFullScreen = { false } >
34+ < h1 > Setup Complete</ h1 >
35+ < IconButton
36+ appearance = "primary"
37+ icon = { Beaker }
38+ onClick = { showExperiments }
39+ text = "Show Experiments"
40+ />
41+ </ EmptyState >
42+ )
43+ }
1744
1845export type ExperimentsProps = {
1946 canGitInitialize : boolean | undefined
@@ -35,7 +62,6 @@ export const Experiments: React.FC<ExperimentsProps> = ({
3562 needsGitCommit,
3663 projectInitialized,
3764 pythonBinPath
38- // eslint-disable-next-line sonarjs/cognitive-complexity
3965} ) => {
4066 if ( cliCompatible === false ) {
4167 return < CliIncompatible checkCompatibility = { checkCompatibility } />
@@ -68,17 +94,5 @@ export const Experiments: React.FC<ExperimentsProps> = ({
6894 return < NeedsGitCommit showScmPanel = { showScmPanel } />
6995 }
7096
71- if ( hasData === undefined ) {
72- return < EmptyState isFullScreen = { false } > Loading Project...</ EmptyState >
73- }
74-
75- if ( ! hasData ) {
76- return < NoData />
77- }
78-
79- return (
80- < EmptyState isFullScreen = { false } >
81- < h1 > { "You're all setup" } </ h1 >
82- </ EmptyState >
83- )
97+ return < ProjectSetup hasData = { hasData } />
8498}
0 commit comments