getQueryParams,
getQueryString,
numToSI,
+ randomStr,
} from "@utils/helpers";
import { canMod, isAdmin, isBanned } from "@utils/roles";
import type { QueryParams } from "@utils/types";
communityViews.length > 0 && (
<div className="card border-secondary mb-3">
<div className="card-body">
- <h5>{I18NextService.i18n.t(translationKey)}</h5>
+ <h2 className="h5">{I18NextService.i18n.t(translationKey)}</h2>
<ul className="list-unstyled mb-0">
{communityViews.map(({ community }) => (
<li key={community.id}>
async fetchUserData() {
const { page, sort, view } = getProfileQueryParams();
- this.setState({ personRes: { state: "empty" } });
+ this.setState({ personRes: { state: "loading" } });
this.setState({
personRes: await HttpService.client.getPersonDetails({
username: this.props.match.params.username,
<HtmlTags
title={this.documentTitle}
path={this.context.router.route.match.url}
+ canonicalPath={personRes.person_view.person.actor_id}
description={personRes.person_view.person.bio}
image={personRes.person_view.person.avatar}
/>
get viewRadios() {
return (
- <div className="btn-group btn-group-toggle flex-wrap mb-2">
+ <div className="btn-group btn-group-toggle flex-wrap mb-2" role="group">
{this.getRadio(PersonDetailsView.Overview)}
{this.getRadio(PersonDetailsView.Comments)}
{this.getRadio(PersonDetailsView.Posts)}
getRadio(view: PersonDetailsView) {
const { view: urlView } = getProfileQueryParams();
const active = view === urlView;
+ const radioId = randomStr();
return (
- <label
- className={classNames("btn btn-outline-secondary pointer", {
- active,
- })}
- >
+ <>
<input
+ id={radioId}
type="radio"
className="btn-check"
value={view}
checked={active}
onChange={linkEvent(this, this.handleViewChange)}
/>
- {I18NextService.i18n.t(view.toLowerCase() as NoOptionI18nKeys)}
- </label>
+ <label
+ htmlFor={radioId}
+ className={classNames("btn btn-outline-secondary pointer", {
+ active,
+ })}
+ >
+ {I18NextService.i18n.t(view.toLowerCase() as NoOptionI18nKeys)}
+ </label>
+ </>
);
}
<div className="mb-0 d-flex flex-wrap">
<div>
{pv.person.display_name && (
- <h5 className="mb-0">{pv.person.display_name}</h5>
+ <h1 className="h4 mb-4">{pv.person.display_name}</h1>
)}
<ul className="list-inline mb-2">
<li className="list-inline-item">