Wrapstodon: Load report data only on display (#37269)
This commit is contained in:
8 files changed
+33
-42
No files matched your search
@@ -1,5 +1,3 @@
|
||||
import { checkAnnualReport } from '@/mastodon/reducers/slices/annual_report';
|
||||
|
||||
import api from '../api';
|
||||
|
||||
import { importFetchedAccount } from './importer';
|
||||
@@ -31,9 +29,6 @@ export const fetchServer = () => (dispatch, getState) => {
|
||||
.get('/api/v2/instance').then(({ data }) => {
|
||||
if (data.contact.account) dispatch(importFetchedAccount(data.contact.account));
|
||||
dispatch(fetchServerSuccess(data));
|
||||
if (data.wrapstodon) {
|
||||
void dispatch(checkAnnualReport());
|
||||
}
|
||||
}).catch(err => dispatch(fetchServerFail(err)));
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user