mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2025-10-10 21:01:54 +05:30
feat: migrate to ags v3
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { GLib, Variable } from "astal";
|
||||
import { createPoll } from "ags/time";
|
||||
import GLib from "gi://GLib";
|
||||
|
||||
export const Time = () => {
|
||||
const time = Variable("").poll(
|
||||
const time = createPoll(
|
||||
"",
|
||||
1000,
|
||||
() => GLib.DateTime.new_now_local().format("%a %b %d - %I:%M:%S %p")!,
|
||||
);
|
||||
|
||||
return (
|
||||
<label cssClasses={["pill"]} onDestroy={() => time.drop()} label={time()} />
|
||||
);
|
||||
return <label cssClasses={["pill"]} label={time} />;
|
||||
};
|
||||
|
Reference in New Issue
Block a user