diff --git a/pkg/interface/src/views/apps/chat/app.tsx b/pkg/interface/src/views/apps/chat/app.tsx index 8fc302064e..0d6ee75847 100644 --- a/pkg/interface/src/views/apps/chat/app.tsx +++ b/pkg/interface/src/views/apps/chat/app.tsx @@ -192,37 +192,37 @@ export default class ChatApp extends React.Component { render={(props) => { let station = `/${props.match.params.ship}/${props.match.params.station}`; - return ( - - - - ); - }} - /> - { - let station = `/${props.match.params.ship}/${props.match.params.station}`; - const mailbox = inbox[station] || { - config: { - read: 0, - length: 0 - }, - envelopes: [] - }; + return ( + + + + ); + }} + /> + { + let station = `/${props.match.params.ship}/${props.match.params.station}`; + const mailbox = inbox[station] || { + config: { + read: 0, + length: 0 + }, + envelopes: [] + }; let roomContacts = {}; const associatedGroup = diff --git a/pkg/interface/src/views/apps/chat/components/join.js b/pkg/interface/src/views/apps/chat/components/join.js index b2dae0a779..556bbe79af 100644 --- a/pkg/interface/src/views/apps/chat/components/join.js +++ b/pkg/interface/src/views/apps/chat/components/join.js @@ -25,7 +25,6 @@ const schema = Yup.object().shape({ export class JoinScreen extends Component { constructor(props) { super(props); - this.state = { awaiting: false }; @@ -38,17 +37,17 @@ export class JoinScreen extends Component { } onSubmit(values) { - console.log(values); + const { props } = this; this.setState({ awaiting: true }, () => { - console.log(values); const station = values.station.trim(); - if (`/${station}` in this.props.chatSynced) { - this.props.history.push(`/~chat/room/${station}`); + if (`/${station}` in props.chatSynced) { + props.history.push(`/~chat/room${station}`); return; } + const ship = station.substr(1).slice(0,station.substr(1).indexOf('/')); - props.api.chat.join(ship, station, true) - this.props.history.push(`/~chat/room/${station}`); + props.api.chat.join(ship, station, true); + props.history.push(`/~chat/room${station}`); }); } @@ -84,7 +83,7 @@ export class JoinScreen extends Component { mt={4} id="station" placeholder="~zod/chatroom" - fontFamily="mono" + fontFamily="mono" caption="Chat names use lowercase, hyphens, and slashes." />