Completely hide GPU from Statusbar when unsupported

This commit is contained in:
Tom B 2024-05-30 15:07:58 -04:00 committed by GitHub
parent ee1894f6b8
commit b443721617
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -81,6 +81,10 @@ export default function Statusbar() {
const gpu = parseInt(stats.gpu); const gpu = parseInt(stats.gpu);
if (isNaN(gpu)) {
return;
}
return ( return (
<Link key={gpuTitle} to="/system#general"> <Link key={gpuTitle} to="/system#general">
{" "} {" "}
@ -97,7 +101,7 @@ export default function Statusbar() {
: "text-danger" : "text-danger"
}`} }`}
/> />
{gpuTitle} {isNaN(gpu) ? 'unknown' : `${gpu}%`} {gpuTitle} {gpu}%
</div> </div>
</Link> </Link>
); );