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:
@@ -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]);
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user