blob: a6ab3b1e333b07a312b07fac4f1e3769a901bf4d (
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
36
37
38
39
40
41
42
43
44
|
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 new-view ' + module.name}>
<div class='heading'>
<h1>{module.displayName || module.name}</h1>
</div>
<div class='col narrow'>
<NewDatasetForm
module={module}
history={history}
/>
<FolderList
db={db}
path={path}
activity="dataset"
emptyText={<i>No projects yet. Please create one~</i>}
/>
</div>
</div>
)
}
}
|