chore: Upgrade a whole lotta dependencies (#436)

* chore: Upgrade a lot of dependencies for `./`

* chore: Upgrade a lot of dependencies for `./example`

* chore: Upgrade a lot of dependencies for `./docs`

* Use new `EventEmitter` syntax (`.remove()`)

* Update Podfile.lock

* docs: Use watch mode

* docs: Replace all relative links with absolute

* Fix all links

* Update docusaurus.config.js

* Upgrade docusaurus-plugin-typedoc to fix docs build

* Update yarn.lock

* Upgrade typescript to 4.4.3

* Fix error unknown

* Update package.json

* Upgrade typedoc

* Upgrade a few more deps

* Fix deprecated sidebar syntax

* Update Gemfile.lock
This commit is contained in:
Marc Rousavy
2021-09-22 13:58:59 +02:00
committed by GitHub
parent 1a4fd7a233
commit d3105fa207
20 changed files with 2294 additions and 2410 deletions

View File

@@ -76,8 +76,9 @@ export const MediaPage: NavigationFunctionComponent<MediaProps> = ({ componentId
});
setSavingState('saved');
} catch (e) {
const message = e instanceof Error ? e.message : JSON.stringify(e);
setSavingState('none');
Alert.alert('Failed to save!', `An unexpected error occured while trying to save your ${type}. ${e?.message ?? JSON.stringify(e)}`);
Alert.alert('Failed to save!', `An unexpected error occured while trying to save your ${type}. ${message}`);
}
}, [path, type]);

View File

@@ -9,10 +9,8 @@ export const useIsForeground = (): boolean => {
const onChange = (state: AppStateStatus): void => {
setIsForeground(state === 'active');
};
const subscription = AppState.addEventListener('change', onChange);
return () => {
subscription.remove();
};
const listener = AppState.addEventListener('change', onChange);
return () => listener.remove();
}, [setIsForeground]);
return isForeground;