// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import './styles.scss'; import React, { useState } from 'react'; import { Row, Col } from 'antd/lib/grid'; import Text from 'antd/lib/typography/Text'; import { connect } from 'react-redux'; import CreateProjectContent from './create-project-content'; import { CombinedState } from '../../reducers/interfaces'; import CreateProjectContext, { ICreateProjectContext } from './create-project.context'; function CreateProjectPageComponent(props: StateToProps): JSX.Element { const { isTrainingActive } = props; const [projectClass, setProjectClass] = useState(''); const [trainingEnabled, setTrainingEnabled] = useState(false); const [isTrainingActiveState] = useState(isTrainingActive); const defaultContext: ICreateProjectContext = { projectClass: { value: projectClass, set: setProjectClass, }, trainingEnabled: { value: trainingEnabled, set: setTrainingEnabled, }, isTrainingActive: { value: isTrainingActiveState, }, }; return ( Create a new project ); } interface StateToProps { isTrainingActive: boolean; } function mapStateToProps(state: CombinedState): StateToProps { return { isTrainingActive: state.plugins.list.PREDICT, }; } export default connect(mapStateToProps)(CreateProjectPageComponent);