mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 20:31:13 +00:00
Fix taglines on Home
(#1701)
* fix taglines on home * fix error on admin panel
This commit is contained in:
parent
751495702c
commit
80d9aac1ca
2 changed files with 5 additions and 3 deletions
|
@ -279,13 +279,15 @@ export class Home extends Component<any, HomeState> {
|
||||||
trendingCommunitiesRes,
|
trendingCommunitiesRes,
|
||||||
commentsRes,
|
commentsRes,
|
||||||
postsRes,
|
postsRes,
|
||||||
tagline: getRandomFromList(this.state?.siteRes?.taglines ?? [])
|
|
||||||
?.content,
|
|
||||||
isIsomorphic: true,
|
isIsomorphic: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
HomeCacheService.postsRes = postsRes;
|
HomeCacheService.postsRes = postsRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.state.tagline = getRandomFromList(
|
||||||
|
this.state?.siteRes?.taglines ?? []
|
||||||
|
)?.content;
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
|
|
@ -141,7 +141,7 @@ export class TaglineForm extends Component<TaglineFormProps, TaglineFormState> {
|
||||||
|
|
||||||
handleEditTaglineClick(d: { i: TaglineForm; index: number }, event: any) {
|
handleEditTaglineClick(d: { i: TaglineForm; index: number }, event: any) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (this.state.editingRow == d.index) {
|
if (d.i.state.editingRow == d.index) {
|
||||||
d.i.setState({ editingRow: undefined });
|
d.i.setState({ editingRow: undefined });
|
||||||
} else {
|
} else {
|
||||||
d.i.setState({ editingRow: d.index });
|
d.i.setState({ editingRow: d.index });
|
||||||
|
|
Loading…
Reference in a new issue