X-Git-Url: http://these/git/?a=blobdiff_plain;f=src%2Fshared%2Fcomponents%2Fperson%2Fprofile.tsx;h=d493f787d5602240ef2b0bfc339315da72863a10;hb=53c3cfeade90150b07431386745a24aa699a25ec;hp=cc334db5ee5449381c02fad9fa08981e879ae754;hpb=4e1e29b9a59f9155cc5aea4271e26208e33d815d;p=lemmy-ui.git
diff --git a/src/shared/components/person/profile.tsx b/src/shared/components/person/profile.tsx
index cc334db..d493f78 100644
--- a/src/shared/components/person/profile.tsx
+++ b/src/shared/components/person/profile.tsx
@@ -18,6 +18,7 @@ import {
getQueryParams,
getQueryString,
numToSI,
+ randomStr,
} from "@utils/helpers";
import { canMod, isAdmin, isBanned } from "@utils/roles";
import type { QueryParams } from "@utils/types";
@@ -137,7 +138,7 @@ const getCommunitiesListing = (
communityViews.length > 0 && (
-
{I18NextService.i18n.t(translationKey)}
+
{I18NextService.i18n.t(translationKey)}
{communityViews.map(({ community }) => (
-
@@ -232,7 +233,7 @@ export class Profile extends Component<
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,
@@ -323,6 +324,7 @@ export class Profile extends Component<
@@ -397,7 +399,7 @@ export class Profile extends Component<
get viewRadios() {
return (
-
+
{this.getRadio(PersonDetailsView.Overview)}
{this.getRadio(PersonDetailsView.Comments)}
{this.getRadio(PersonDetailsView.Posts)}
@@ -409,22 +411,27 @@ export class Profile extends Component<
getRadio(view: PersonDetailsView) {
const { view: urlView } = getProfileQueryParams();
const active = view === urlView;
+ const radioId = randomStr();
return (
-
+
+ >
);
}
@@ -472,7 +479,7 @@ export class Profile extends Component<
{pv.person.display_name && (
-
{pv.person.display_name}
+
{pv.person.display_name}
)}