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,
|
||||
commentsRes,
|
||||
postsRes,
|
||||
tagline: getRandomFromList(this.state?.siteRes?.taglines ?? [])
|
||||
?.content,
|
||||
isIsomorphic: true,
|
||||
};
|
||||
|
||||
HomeCacheService.postsRes = postsRes;
|
||||
}
|
||||
|
||||
this.state.tagline = getRandomFromList(
|
||||
this.state?.siteRes?.taglines ?? []
|
||||
)?.content;
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
|
|
@ -141,7 +141,7 @@ export class TaglineForm extends Component<TaglineFormProps, TaglineFormState> {
|
|||
|
||||
handleEditTaglineClick(d: { i: TaglineForm; index: number }, event: any) {
|
||||
event.preventDefault();
|
||||
if (this.state.editingRow == d.index) {
|
||||
if (d.i.state.editingRow == d.index) {
|
||||
d.i.setState({ editingRow: undefined });
|
||||
} else {
|
||||
d.i.setState({ editingRow: d.index });
|
||||
|
|
Loading…
Reference in a new issue