add following slates & rebasing

This commit is contained in:
tarafanlin 2021-01-10 11:34:54 -08:00
parent c591e68291
commit 2ee4fde0c9
2 changed files with 22 additions and 8 deletions

View File

@ -149,8 +149,16 @@ export default class Profile extends React.Component {
const external = !this.props.onAction;
let data = this.props.creator ? this.props.creator : this.props.data;
let exploreSlates = this.props.exploreSlates;
let subscriptions = this.props.creator.subscriptions ? this.props.creator.subscriptions : null;
let followingSlates = [];
for (let subscription of subscriptions) {
if (subscription.slate != null) {
followingSlates.push(subscription.slate);
}
}
console.log(this.props);
console.log("creator.subscription", subscriptions);
console.log("following slates", followingSlates);
let total = 0;
for (let slate of data.slates) {
@ -256,13 +264,24 @@ export default class Profile extends React.Component {
) : null}
</div>
) : null}
{this.state.slateTab === 1 ? <div>{/*following slates*/}</div> : null}
{this.state.slateTab === 1 ? (
<div>
{followingSlates ? (
<SlatePreviewBlocks
isOwner={false}
external={this.props.onAction ? false : true}
slates={followingSlates}
onAction={this.props.onAction}
/>
) : null}
</div>
) : null}
</div>
) : null}
{this.state.tab === 2 ? (
<div>
<SecondaryTabGroup
tabs={["Following", "Follower"]}
tabs={["Following", "Followers"]}
value={this.state.peerTab}
onChange={(value) => this.setState({ peerTab: value })}
style={{ margin: "0 0 24px 0" }}

View File

@ -34,17 +34,12 @@ export const create = () => {
});
ws.on("close", () => {
<<<<<<< HEAD
console.log(global.websocket);
console.log("Websocket disconnected");
=======
global.websocket = null;
setTimeout(() => {
NodeLogging.log(`Auto reconnecting websocket`);
create();
}, 1000);
NodeLogging.log(`Websocket disconnected`);
>>>>>>> fixed slate updating upon upload issue
});
NodeLogging.log(`Websocket server started`);