feat: Clock widget and dayjs locale standard (#79)

* feat: Clock widget and dayjs locale standard

Co-authored-by: Meier Lukas
- Widget options modifications
<meierschlumpf@gmail.com>

* perf: add improved time state for clock widget

* fix: final fixes

* refactor: unify selectOptions

* chore: fix CI & remove serverdata from clock widget

* chore: Change custom title to be under a toggle

---------

Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
Tagaishi
2024-03-09 19:25:48 +01:00
committed by GitHub
parent dceec34929
commit edcba9ceb6
10 changed files with 213 additions and 60 deletions

View File

@@ -32,12 +32,13 @@ interface ItemDataLoaderProps {
item: Board["sections"][number]["items"][number];
}
const ItemDataLoader = async ({ item }: ItemDataLoaderProps) => {
const ItemDataLoader = /*async*/ ({ item }: ItemDataLoaderProps) => {
const widgetImport = widgetImports[item.kind];
if (!("serverDataLoader" in widgetImport)) {
return <ClientServerDataInitalizer id={item.id} serverData={undefined} />;
}
const loader = await widgetImport.serverDataLoader();
const data = await loader.default(item as never);
return <ClientServerDataInitalizer id={item.id} serverData={data} />;
//const loader = await widgetImport.serverDataLoader();
//const data = await loader.default(item as never);
//return <ClientServerDataInitalizer id={item.id} serverData={data} />;
return null;
};