iterative/vscode-dvc

View on GitHub
webview/src/plots/components/emptyState/GetStarted.tsx

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import React from 'react'
import { AddPlots } from './AddPlots'
import { Welcome } from './Welcome'
import { EmptyState } from './EmptyState'

type GetStartedProps = {
  hasCustomPlots: boolean
  hasPlots: boolean
  hasUnselectedPlots: boolean
  modal: React.ReactNode
}

export const GetStarted: React.FC<GetStartedProps> = ({
  hasCustomPlots,
  hasPlots,
  hasUnselectedPlots,
  modal
}) => (
  <EmptyState hasCustomPlots={hasCustomPlots} modal={modal}>
    {hasPlots ? (
      <AddPlots hasUnselectedPlots={hasUnselectedPlots} />
    ) : (
      <Welcome />
    )}
  </EmptyState>
)