mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-10 15:13:02 -04:00
better handling for settings ui errors
This commit is contained in:
parent
eabbf7d9bd
commit
b30508aef8
5 changed files with 60 additions and 4 deletions
|
@ -23,6 +23,7 @@ import { useAwaiter } from "../utils/misc";
|
|||
import { Alerts, Button, Forms, Margins, Parser, React, Switch } from "../webpack/common";
|
||||
import ErrorBoundary from "./ErrorBoundary";
|
||||
import { Flex } from "./Flex";
|
||||
import { handleComponentFailed } from "./handleComponentFailed";
|
||||
|
||||
export default ErrorBoundary.wrap(function Settings() {
|
||||
const [settingsDir, , settingsDirPending] = useAwaiter(() => VencordNative.ipc.invoke<string>(IpcEvents.GET_SETTINGS_DIR), "Loading...");
|
||||
|
@ -115,4 +116,7 @@ export default ErrorBoundary.wrap(function Settings() {
|
|||
</Switch>}
|
||||
</Forms.FormSection >
|
||||
);
|
||||
}, {
|
||||
message: "Failed to render the Settings. If this persists, try using the installer to reinstall!",
|
||||
onError: handleComponentFailed,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue