mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
try waiting to fetch until after render for googlebot
This commit is contained in:
parent
3bd6bf7706
commit
0e2916358b
1 changed files with 8 additions and 8 deletions
|
|
@ -17,14 +17,6 @@ export class Home extends React.Component<RouteComponentProps<{}>, IFilterListsS
|
|||
filterLists: [],
|
||||
loading: true
|
||||
};
|
||||
fetch("https://filterlists.com/api/v1/lists")
|
||||
.then(response => response.json() as Promise<IFilterListSummaryDto[]>)
|
||||
.then(data => {
|
||||
this.setState({
|
||||
filterLists: data,
|
||||
loading: false
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
@ -33,6 +25,14 @@ export class Home extends React.Component<RouteComponentProps<{}>, IFilterListsS
|
|||
<em>Loading...</em>
|
||||
</p>
|
||||
: Home.renderFilterListsTable(this.state.filterLists);
|
||||
fetch("https://filterlists.com/api/v1/lists")
|
||||
.then(response => response.json() as Promise<IFilterListSummaryDto[]>)
|
||||
.then(data => {
|
||||
this.setState({
|
||||
filterLists: data,
|
||||
loading: false
|
||||
});
|
||||
});
|
||||
return <div>
|
||||
{contents}
|
||||
</div>;
|
||||
|
|
|
|||
Loading…
Reference in a new issue