style: fix formatting in v2 files
This commit is contained in:
2 files changed
+5
-8
No files matched your search
@@ -44,12 +44,11 @@ export const CustomWidgetList = ({ definitions }: CustomWidgetListProps) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack gap="sm">
|
<Stack gap="sm">
|
||||||
{definitions.map((def) => (
|
{definitions.map((def) => (
|
||||||
<CustomWidgetCard key={def.id} widget={def} />
|
<CustomWidgetCard key={def.id} widget={def} />
|
||||||
))}
|
))}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ const mapOsDistributionEntry = (
|
|||||||
osVersion: entry.os_version,
|
osVersion: entry.os_version,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const parsePatchMonStatsResponseAsync = async (
|
export const parsePatchMonStatsResponseAsync = async (response: {
|
||||||
response: { json: () => Promise<unknown> },
|
json: () => Promise<unknown>;
|
||||||
): Promise<z.infer<typeof patchmonStatsResponseSchema>> => {
|
}): Promise<z.infer<typeof patchmonStatsResponseSchema>> => {
|
||||||
let json: unknown;
|
let json: unknown;
|
||||||
try {
|
try {
|
||||||
json = await response.json();
|
json = await response.json();
|
||||||
@@ -82,7 +82,5 @@ export const mapPatchMonStats = (data: z.infer<typeof patchmonStatsResponseSchem
|
|||||||
totalOutdatedPackages: data.total_outdated_packages,
|
totalOutdatedPackages: data.total_outdated_packages,
|
||||||
totalRepos: data.total_repos,
|
totalRepos: data.total_repos,
|
||||||
lastUpdated: data.last_updated,
|
lastUpdated: data.last_updated,
|
||||||
osDistribution: [...data.os_distribution]
|
osDistribution: [...data.os_distribution].map(mapOsDistributionEntry).sort((a, b) => b.count - a.count),
|
||||||
.map(mapOsDistributionEntry)
|
|
||||||
.sort((a, b) => b.count - a.count),
|
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user