|
1 | 1 | "use strict";
|
| 2 | +var __extends = (this && this.__extends) || function (d, b) { |
| 3 | + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; |
| 4 | + function __() { this.constructor = d; } |
| 5 | + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |
| 6 | +}; |
2 | 7 | var React = require('react');
|
3 | 8 | var index_1 = require('../index');
|
4 | 9 | var Tasks_1 = require('./Tasks');
|
| 10 | +var Top_1 = require('../TopPanel/Top'); |
5 | 11 | var styles = {
|
6 | 12 | width: '100%',
|
7 | 13 | overflowY: 'scroll',
|
8 | 14 | };
|
9 |
| -var Page = function (_a) { |
10 |
| - var tutorial = _a.tutorial, pagePosition = _a.pagePosition; |
11 |
| - var page = tutorial.pages[pagePosition]; |
12 |
| - console.log(page); |
13 |
| - if (!page) { |
14 |
| - return null; |
| 15 | +var Page = (function (_super) { |
| 16 | + __extends(Page, _super); |
| 17 | + function Page() { |
| 18 | + _super.apply(this, arguments); |
15 | 19 | }
|
16 |
| - return (React.createElement("section", {style: styles, className: 'cr-page'}, React.createElement(index_1.ContentCard, {title: page.title, content: page.description}), React.createElement(Tasks_1.default, {tasks: page.tasks, page: page}))); |
17 |
| -}; |
| 20 | + Page.prototype.componentDidMount = function () { |
| 21 | + Top_1.default.toggle(true); |
| 22 | + }; |
| 23 | + Page.prototype.render = function () { |
| 24 | + var _a = this.props, tutorial = _a.tutorial, pagePosition = _a.pagePosition; |
| 25 | + var page = tutorial.pages[pagePosition]; |
| 26 | + if (!page) { |
| 27 | + return null; |
| 28 | + } |
| 29 | + return (React.createElement("section", {style: styles, className: 'cr-page'}, React.createElement(index_1.ContentCard, {title: page.title, content: page.description}), React.createElement(Tasks_1.default, {tasks: page.tasks, page: page}))); |
| 30 | + }; |
| 31 | + return Page; |
| 32 | +}(React.Component)); |
18 | 33 | Object.defineProperty(exports, "__esModule", { value: true });
|
19 | 34 | exports.default = Page;
|
| 35 | +; |
0 commit comments