refactor
This commit is contained in:
1 parent
dddb4bce11
commit
3edfbc19f6
11 files changed
+134
-116
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { Variable } from "astal";
|
||||
import computeCPU from "./helpers";
|
||||
|
||||
export default function Cpu() {
|
||||
const cpu_usage = Variable<string>("").poll(5000, () => computeCPU());
|
||||
|
||||
return (
|
||||
<box className="cpu">
|
||||
<label
|
||||
className="Cpu"
|
||||
onDestroy={() => cpu_usage.drop()}
|
||||
label={cpu_usage()}
|
||||
/>
|
||||
</box>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user