feat: add app widget (#206)
* refactor: move server api to api package * feat: add app widget * refactor: add element size for widget components on board * feat: add resize listener for widget width * feat: add widget app input * refactor: add better responsibe layout, add missing translations * fix: ci issues * fix: deepsource issues * chore: address pull request feedback
This commit is contained in:
10
packages/widgets/src/app/serverData.ts
Normal file
10
packages/widgets/src/app/serverData.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
"use server";
|
||||
|
||||
import { api } from "@homarr/api/server";
|
||||
|
||||
import type { WidgetProps } from "../definition";
|
||||
|
||||
export default async function getServerData({ options }: WidgetProps<"app">) {
|
||||
const app = await api.app.byId({ id: options.appId });
|
||||
return { app };
|
||||
}
|
||||
Reference in New Issue
Block a user