Basic structure of a react SDK and start of an implementation.
This commit is contained in:
commit
c42733ec95
15 changed files with 407 additions and 0 deletions
26
src/pages/MatrixChat.js
Normal file
26
src/pages/MatrixChat.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
var React = require('react');
|
||||
|
||||
var ThreadSection = require('../organisms/ThreadSection');
|
||||
var MessageSection = require('../organisms/MessageSection');
|
||||
|
||||
var Login = require('../templates/Login');
|
||||
|
||||
var mxCli = require("../MatrixClientPeg").get();
|
||||
|
||||
module.exports = React.createClass({
|
||||
render: function() {
|
||||
if (mxCli && mxCli.credentials) {
|
||||
return (
|
||||
<div>
|
||||
<ThreadSection />
|
||||
<MessageSection />
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<Login />
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue