// Edit account parameters. import React from 'react'; import { FormattedMessage } from 'react-intl'; import AvatarUpload from '../widgets/avatar-upload.jsx'; import BadgeList from '../widgets/badge-list.jsx'; import { makeImageUrl } from '../lib/blob-helpers.js'; import { MAX_TITLE_LENGTH, MAX_TOPIC_DESCRIPTION_LENGTH } from '../config.js'; function _clip(str, length) { return str && str.substring(0, length); } export default class AccountSettingsView extends React.Component { constructor(props) { super(props); const me = this.props.tinode.getMeTopic(); this.state = { fullName: _clip(me.public ? me.public.fn : undefined, MAX_TITLE_LENGTH), description: _clip(me.public ? me.public.note : undefined, MAX_TOPIC_DESCRIPTION_LENGTH), avatar: makeImageUrl(me.public ? me.public.photo : null) }; } render() { return (
{e.preventDefault(); this.props.onNavigate('general');}}> edit 
{this.state.fullName}
  {this.props.myUserId}
{this.state.description ?
{this.state.description}
: null}
{e.preventDefault(); this.props.onNavigate('notif');}}> notifications  {e.preventDefault(); this.props.onNavigate('security');}}> security  {e.preventDefault(); this.props.onNavigate('support');}}> contact_support 
); } };