Settings should be wrapped in ErrorBoundary

This commit is contained in:
Vendicated 2025-02-06 04:13:03 +01:00
parent 2e72fa6589
commit 57cae6f9f1
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -6,6 +6,7 @@
import "./settings.css";
import { ErrorBoundary } from "@vencord/types/components";
import { Forms, Switch, Text } from "@vencord/types/webpack/common";
import { ComponentType } from "react";
import { Settings, useSettings } from "renderer/settings";
@ -155,14 +156,20 @@ function SettingsSections() {
return <>{sections}</>;
}
export default function SettingsUi() {
return (
<Forms.FormSection>
<Text variant="heading-lg/semibold" style={{ color: "var(--header-primary)" }} tag="h2">
Vesktop Settings
</Text>
export default ErrorBoundary.wrap(
function SettingsUI() {
return (
<Forms.FormSection>
<Text variant="heading-lg/semibold" style={{ color: "var(--header-primary)" }} tag="h2">
Vesktop Settings
</Text>
<SettingsSections />
</Forms.FormSection>
);
}
<SettingsSections />
</Forms.FormSection>
);
},
{
message:
"Failed to render the Vesktop Settings tab. If this issue persists, try to right click the Vesktop tray icon, then click 'Repair Vencord'. And make sure your Vesktop is up to date."
}
);