Migrate tiles from id to type

This commit is contained in:
Meier Lukas
2023-03-30 22:20:56 +02:00
parent 43dc1cd70c
commit 525985b1dc
14 changed files with 59 additions and 58 deletions

View File

@@ -33,7 +33,7 @@ const useWidget = <T extends IWidget<string, any>>(widget: T): T => {
};
export const WidgetWrapper = ({
widgetType: widgetId,
widgetType,
widget,
className,
WidgetComponent,
@@ -43,7 +43,7 @@ export const WidgetWrapper = ({
return (
<ErrorBoundary>
<HomarrCardWrapper className={className}>
<WidgetsMenu integration={widgetId} widget={widgetWithDefaultProps} />
<WidgetsMenu integration={widgetType} widget={widgetWithDefaultProps} />
<WidgetComponent widget={widgetWithDefaultProps} />
</HomarrCardWrapper>
</ErrorBoundary>

View File

@@ -58,7 +58,7 @@ const useDashDotStorage = () => {
'dashdot/storage',
{
configName,
url: config?.widgets.find((x) => x.id === 'dashdot')?.properties.url,
url: config?.widgets.find((x) => x.type === 'dashdot')?.properties.url,
},
],
queryFn: () => fetchDashDotStorageLoad(configName),