1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-18 13:48:58 +02:00

fix: lint

This commit is contained in:
Tymoteusz Czech 2025-07-10 17:20:40 +02:00
parent 6af1acb8fc
commit ede3d2d354
No known key found for this signature in database
GPG Key ID: 133555230D88D75F
3 changed files with 10 additions and 7 deletions

View File

@ -1,6 +1,6 @@
import { useCallback } from 'react';
import { useImpactMetricsSettings } from 'hooks/api/getters/useImpactMetricsSettings/useImpactMetricsSettings.js';
import {useImpactMetricsSettingsApi} from 'hooks/api/actions/useImpactMetricsSettingsApi/useImpactMetricsSettingsApi.js';
import { useImpactMetricsSettingsApi } from 'hooks/api/actions/useImpactMetricsSettingsApi/useImpactMetricsSettingsApi.js';
import type { ChartConfig, ImpactMetricsState, LayoutItem } from '../types.ts';
export const useImpactMetricsState = () => {
@ -98,7 +98,10 @@ export const useImpactMetricsState = () => {
charts: settings.charts || [],
layout: settings.layout || [],
loading: settingsLoading || actionLoading,
error: settingsError || Object.keys(actionErrors).length > 0 ? actionErrors : undefined,
error:
settingsError || Object.keys(actionErrors).length > 0
? actionErrors
: undefined,
addChart,
updateChart,
deleteChart,

View File

@ -14,7 +14,7 @@ export const useImpactMetricsSettingsApi = () => {
path,
{
method: 'PUT',
body: JSON.stringify(settings)
body: JSON.stringify(settings),
},
'updateImpactMetricsSettings',
);

View File

@ -4,10 +4,10 @@ import type { ImpactMetricsState } from 'component/impact-metrics/types.ts';
export const useImpactMetricsSettings = () => {
const PATH = `api/admin/impact-metrics/settings`;
const { data, refetch, loading, error } =
useApiGetter<ImpactMetricsState>(formatApiPath(PATH), () =>
fetcher(formatApiPath(PATH), 'Impact metrics settings'),
);
const { data, refetch, loading, error } = useApiGetter<ImpactMetricsState>(
formatApiPath(PATH),
() => fetcher(formatApiPath(PATH), 'Impact metrics settings'),
);
return {
settings: data || { charts: [], layout: [] },