<commit_before>import {h, Component}	 				from 'preact/preact';

import ContentList						from 'com/content-list/list';
import ContentSimple					from 'com/content-simple/simple';
import ContentHeadliner					from 'com/content-headliner/headliner';

import ContentCommonNav					from 'com/content-common/common-nav';

import ButtonFollow						from 'com/content-common/common-nav-button-follow';

//import $Node							from 'shrub/js/node/node';


export default class ContentUser extends Component {
	constructor( props ) {
		super(props);
	}

	isEditMode() {
		let {extra} = this.props;
		return extra && extra.length && (extra[extra.length-1] == 'edit');
	}

	render( props ) {
		let {node, user, path, extra} = props;
		props = Object.assign({}, props);	// Shallow copy we can change props

		let IsHome = false;
		if ( extra && (extra.length == 0) ) {
			IsHome = true;
		}

		props.header = "USER";
		props.headerIcon = "user";
		props.headerClass = "-col-bc";

		props.subtitle = '@'+node.slug;
		props.notitleedit = true;

		props.authored = true;
		props.by = "Joined";
		props.noby = true;

		props.label = "Biography";

//		props.minmax = true;
//		if ( !IsHome ) {
//			props.minimized = true;
//		}

		let BodyNavBar = [];
		if ( !this.isEditMode() ) {
			if ( user && user.id && (node.id !== user.id) ) {
				BodyNavBar.push(<ButtonFollow node={node} user={user} />);
			}
		}

		let ShowContent = null;
		if ( IsHome ) {
			return (
				<ContentSimple {...props} class={cN("content-user", props.class)}>
					<ContentCommonNav>{BodyNavBar}</ContentCommonNav>
				</ContentSimple>
			);
		}
		return (
			<ContentHeadliner node={node} name="user" icon="user" class="-col-bc" published="Joined" at games articles trophies />
		);
	}
}<commit_msg>oops, broke editing of users<commit_after>import {h, Component}	 				from 'preact/preact';

import ContentList						from 'com/content-list/list';
import ContentSimple					from 'com/content-simple/simple';
import ContentHeadliner					from 'com/content-headliner/headliner';

import ContentCommonNav					from 'com/content-common/common-nav';

import ButtonFollow						from 'com/content-common/common-nav-button-follow';

//import $Node							from 'shrub/js/node/node';


export default class ContentUser extends Component {
	constructor( props ) {
		super(props);
	}

	isEditMode() {
		let {extra} = this.props;
		return extra && extra.length && (extra[extra.length-1] == 'edit');
	}

	render( props ) {
		let {node, user, path, extra} = props;
		props = Object.assign({}, props);	// Shallow copy we can change props

		let IsHome = false;
		if ( extra && (extra.length == 0) ) {
			IsHome = true;
		}

		props.header = "USER";
		props.headerIcon = "user";
		props.headerClass = "-col-bc";

		props.subtitle = '@'+node.slug;
		props.notitleedit = true;

		props.authored = true;
		props.by = "Joined";
		props.noby = true;

		props.label = "Biography";

//		props.minmax = true;
//		if ( !IsHome ) {
//			props.minimized = true;
//		}

		let BodyNavBar = [];
		if ( !this.isEditMode() ) {
			if ( user && user.id && (node.id !== user.id) ) {
				BodyNavBar.push(<ButtonFollow node={node} user={user} />);
			}
		}

		let ShowContent = null;
		if ( IsHome || this.isEditMode() ) {
			return (
				<ContentSimple {...props} class={cN("content-user", props.class)}>
					<ContentCommonNav>{BodyNavBar}</ContentCommonNav>
				</ContentSimple>
			);
		}
		return (
			<ContentHeadliner node={node} name="user" icon="user" class="-col-bc" published="Joined" at games articles trophies />
		);
	}
}
{'fraction_non_alphanumeric': 0.163184641445511, 'fraction_numerical': 0.001129305477131564, 'mean_word_length': 3.227923627684964, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7292981', 'n_tokens_mistral': 1400, 'n_tokens_neox': 1208, 'n_words': 269}