[bugfix] Fix linter issues (#85)

- [x] .js
- [x] .json
- [x] .md
- [x] .scss
- [x] .yml

Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/85
Co-authored-by: Zoë Bijl <code@moiety.me>
Co-committed-by: Zoë Bijl <code@moiety.me>
This commit is contained in:
Zoë Bijl
2025-10-09 11:11:42 +02:00
committed by tobi
parent 8a26776492
commit adf075d19f
6 changed files with 23 additions and 19 deletions

View File

@@ -17,17 +17,20 @@ export const fetchServer = () => (dispatch, getState) => {
dispatch(fetchServerRequest());
/* global data */
try {
api(getState)
.get('/api/v2/instance').then({ data });
if (data.contact.account) dispatch(importFetchedAccount(data.contact.account));
dispatch(fetchServerSuccess(data));
.get('/api/v2/instance').then({ data }).catch(error => {
console.error(error);
});
if (data.contact.account) dispatch(importFetchedAccount(data.contact.account));
dispatch(fetchServerSuccess(data));
} catch (e) {
api(getState)
.get('/api/v1/instance').then(({ data }) => {
if (data.contact_account) dispatch(importFetchedAccount(data.contact_account));
dispatch(fetchServerSuccess(data));
}).catch(err => dispatch(fetchServerFail(err)));
}).catch(err => dispatch(fetchServerFail(err)));
}
};

View File

@@ -23,9 +23,8 @@ import Audio from 'mastodon/features/audio';
import CharacterCounter from 'mastodon/features/compose/components/character_counter';
import UploadProgress from 'mastodon/features/compose/components/upload_progress';
import { Tesseract as fetchTesseract } from 'mastodon/features/ui/util/async-components';
import { me } from 'mastodon/initial_state';
import { me , maxMediaDescChars } from 'mastodon/initial_state';
import { assetHost } from 'mastodon/utils/config';
import { maxMediaDescChars } from 'mastodon/initial_state';
import { changeUploadCompose, uploadThumbnail, onChangeMediaDescription, onChangeMediaFocus } from '../../../actions/compose';
import Video, { getPointerPosition } from '../../video';