blob: 93ac3d5539e44feac9267935d44c41936a734e62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import { h, Component } from 'preact'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { Link } from 'react-router-dom'
import util from '../../util'
import Group from '../group.component'
import Param from '../param.component'
import Loading from '../loading.component'
import FolderList from '../folderList.component'
import NewDatasetForm from '../../dataset/dataset.new'
export default class NewView extends Component {
constructor(props){
super(props)
console.log(props)
if (! props.db.data) {
props.actions.load_directories()
}
}
render(){
const { module, history, db, path } = this.props
return (
<div class={'app ' + module.name}>
<h1> {module.displayName || module.name}</h1>
<br/>
<div class='col narrow'>
<NewDatasetForm module={module} history={history} />
<FolderList db={db} path={path} emptyText={<i>No projects yet. Please create one~</i>} />
</div>
</div>
)
}
}
|