mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 11:41:58 +00:00
trigger temporarilyDisableReporting in errorboundary
This commit is contained in:
@@ -32,8 +32,9 @@ const DeckyErrorBoundary: FunctionComponent<DeckyErrorBoundaryProps> = ({ error,
|
|||||||
const [debugAllowed, setDebugAllowed] = useState<boolean>(true);
|
const [debugAllowed, setDebugAllowed] = useState<boolean>(true);
|
||||||
// Intentionally doesn't use DeckyState.
|
// Intentionally doesn't use DeckyState.
|
||||||
const [versionInfo, setVersionInfo] = useState<VerInfo>();
|
const [versionInfo, setVersionInfo] = useState<VerInfo>();
|
||||||
const [errorSource, wasCausedByPlugin] = getLikelyErrorSourceFromValveReactError(error);
|
const [errorSource, wasCausedByPlugin, shouldReportToValve] = getLikelyErrorSourceFromValveReactError(error);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!shouldReportToValve) DeckyPluginLoader.errorBoundaryHook.temporarilyDisableReporting();
|
||||||
DeckyPluginLoader.updateVersion().then(setVersionInfo);
|
DeckyPluginLoader.updateVersion().then(setVersionInfo);
|
||||||
}, []);
|
}, []);
|
||||||
return (
|
return (
|
||||||
@@ -64,7 +65,7 @@ const DeckyErrorBoundary: FunctionComponent<DeckyErrorBoundaryProps> = ({ error,
|
|||||||
userSelect: 'auto',
|
userSelect: 'auto',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
⚠️ An error occured rendering this content.
|
⚠️ An error occured while rendering this content.
|
||||||
</h1>
|
</h1>
|
||||||
<pre style={{}}>
|
<pre style={{}}>
|
||||||
<code>
|
<code>
|
||||||
|
|||||||
Reference in New Issue
Block a user