forked from mjothy/future-sight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DashboardView.tsx
44 lines (41 loc) · 1.29 KB
/
DashboardView.tsx
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 {
BlockModel,
ComponentPropsWithDataManager,
Dashboard,
DashboardModel,
} from '@future-sight/common';
import React from 'react';
import SetupView from './form/SetupView';
import { RoutingProps } from '../app/Routing';
interface DashboardViewProps extends ComponentPropsWithDataManager, RoutingProps {
dashboard: DashboardModel;
addBlock: (blockType: string, masterBlockId?: string) => void;
copyBlock: (blockSelectedId: string) => void;
blockSelectedId: string;
updateSelectedBlock: (blockSelectedId: string) => void;
saveDashboard: (username: string, password: string, callback: (idPermanent) => void, image?: string) => void;
deleteBlocks: (blockId: string[]) => void;
isDraft: boolean;
readonly?: boolean;
updateDashboard: (dashboard: DashboardModel) => void;
checkIfSelectedInOptions: (optionsData, block: BlockModel) => void;
allData: any,
}
/**
* Render dashboard and set up view (focus data filter)
*/
class DashboardView extends React.Component<DashboardViewProps, any> {
render() {
return (
<>
<Dashboard {...this.props} />
<SetupView
dashboard={this.props.dashboard}
updateDashboard={this.props.updateDashboard}
allData={this.props.allData}
/>
</>
);
}
}
export default DashboardView;