From 2ee4fde0c9adb70c003940546c82eeac8755f895 Mon Sep 17 00:00:00 2001 From: tarafanlin <35607644+tarafanlin@users.noreply.github.com> Date: Sun, 10 Jan 2021 11:34:54 -0800 Subject: [PATCH] add following slates & rebasing --- components/core/Profile.js | 25 ++++++++++++++++++++++--- node_common/nodejs-websocket.js | 5 ----- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/components/core/Profile.js b/components/core/Profile.js index ffa7c755..1a5033f5 100644 --- a/components/core/Profile.js +++ b/components/core/Profile.js @@ -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} ) : null} - {this.state.slateTab === 1 ?
{/*following slates*/}
: null} + {this.state.slateTab === 1 ? ( +
+ {followingSlates ? ( + + ) : null} +
+ ) : null} ) : null} {this.state.tab === 2 ? (
this.setState({ peerTab: value })} style={{ margin: "0 0 24px 0" }} diff --git a/node_common/nodejs-websocket.js b/node_common/nodejs-websocket.js index 1ccb5e91..4c4e5707 100644 --- a/node_common/nodejs-websocket.js +++ b/node_common/nodejs-websocket.js @@ -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`);