style: auto-fix lint and format
This commit is contained in:
1 parent
94cbbde576
commit
598307c7bf
8 files changed
+9
-11
No files matched your search
@@ -169,9 +169,7 @@ export const QueryRefreshIndicator = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const QueryMenuItem = ({ row }: { row: QueryStatusRow }) => {
|
const QueryMenuItem = ({ row }: { row: QueryStatusRow }) => {
|
||||||
const rowColor = statusColorMap[
|
const rowColor = statusColorMap[row.fetchStatus === "fetching" ? "fetching" : `idle_${row.status}`] ?? "gray";
|
||||||
row.fetchStatus === "fetching" ? "fetching" : `idle_${row.status}`
|
|
||||||
] ?? "gray";
|
|
||||||
|
|
||||||
const updatedLabel = row.dataUpdatedAt > 0 ? dayjs(row.dataUpdatedAt).fromNow() : "never";
|
const updatedLabel = row.dataUpdatedAt > 0 ? dayjs(row.dataUpdatedAt).fromNow() : "never";
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export default function BookmarksWidget({ options, itemId }: WidgetComponentProp
|
|||||||
const board = useRequiredBoard();
|
const board = useRequiredBoard();
|
||||||
const { data = [] } = clientApi.app.byIds.useQuery(options.items, {
|
const { data = [] } = clientApi.app.byIds.useQuery(options.items, {
|
||||||
select(data) {
|
select(data) {
|
||||||
return data.sort((appA, appB) => options.items.indexOf(appA.id) - options.items.indexOf(appB.id));
|
return data.toSorted((appA, appB) => options.items.indexOf(appA.id) - options.items.indexOf(appB.id));
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -332,5 +332,5 @@ export const matchFileSystemAndSmart = (fileSystems: FileSystem[], smartData: Sm
|
|||||||
overallStatus: smartDisk?.overallStatus ?? "",
|
overallStatus: smartDisk?.overallStatus ?? "",
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.sort((fileSystemA, fileSystemB) => fileSystemA.deviceName.localeCompare(fileSystemB.deviceName));
|
.toSorted((fileSystemA, fileSystemB) => fileSystemA.deviceName.localeCompare(fileSystemB.deviceName));
|
||||||
};
|
};
|
||||||
@@ -43,7 +43,7 @@ export default function MediaServerWidget({
|
|||||||
const newData = filteredData.concat(
|
const newData = filteredData.concat(
|
||||||
data.requests.map((request) => ({ ...request, integrationId: data.integrationId })),
|
data.requests.map((request) => ({ ...request, integrationId: data.integrationId })),
|
||||||
);
|
);
|
||||||
return newData.sort((dataA, dataB) => {
|
return newData.toSorted((dataA, dataB) => {
|
||||||
if (dataA.status === dataB.status) {
|
if (dataA.status === dataB.status) {
|
||||||
return dataB.createdAt.getTime() - dataA.createdAt.getTime();
|
return dataB.createdAt.getTime() - dataA.createdAt.getTime();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ export default function ReleasesWidget({ options }: WidgetComponentProps<"releas
|
|||||||
(repository) =>
|
(repository) =>
|
||||||
"error" in repository || !options.showOnlyHighlighted || repository.isNewRelease || repository.isStaleRelease,
|
"error" in repository || !options.showOnlyHighlighted || repository.isNewRelease || repository.isStaleRelease,
|
||||||
)
|
)
|
||||||
.sort((repoA, repoB) => {
|
.toSorted((repoA, repoB) => {
|
||||||
if ("error" in repoA) return -1;
|
if ("error" in repoA) return -1;
|
||||||
if ("error" in repoB) return 1;
|
if ("error" in repoB) return 1;
|
||||||
return repoA.latestReleaseAt > repoB.latestReleaseAt ? -1 : 1;
|
return repoA.latestReleaseAt > repoB.latestReleaseAt ? -1 : 1;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const useLiveFeedEntries = (input: RouterInputs["widget"]["rssFeed"]["getFeeds"]
|
|||||||
return oldData
|
return oldData
|
||||||
?.filter((entry) => entry.feedUrl !== updatedData.url)
|
?.filter((entry) => entry.feedUrl !== updatedData.url)
|
||||||
.concat(updatedData.entries)
|
.concat(updatedData.entries)
|
||||||
.sort((entryA, entryB) => {
|
.toSorted((entryA, entryB) => {
|
||||||
return entryA.published && entryB.published
|
return entryA.published && entryB.published
|
||||||
? new Date(entryB.published).getTime() - new Date(entryA.published).getTime()
|
? new Date(entryB.published).getTime() - new Date(entryA.published).getTime()
|
||||||
: 0;
|
: 0;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export function UmamiContent({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const { data: multiEventSeries } = clientApi.widget.umami.getMultiEventTimeSeries.useQuery(
|
const { data: multiEventSeries } = clientApi.widget.umami.getMultiEventTimeSeries.useQuery(
|
||||||
{ integrationId: integrationIds[0] ?? "", websiteId, timeFrame, eventNames: [...eventNames].sort() },
|
{ integrationId: integrationIds[0] ?? "", websiteId, timeFrame, eventNames: [...eventNames].toSorted() },
|
||||||
{ enabled: viewMode === "events" && eventNames.length > 0 },
|
{ enabled: viewMode === "events" && eventNames.length > 0 },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export function UmamiEventsContent({
|
|||||||
integrationId: integrationIds[0] ?? "",
|
integrationId: integrationIds[0] ?? "",
|
||||||
websiteId,
|
websiteId,
|
||||||
timeFrame,
|
timeFrame,
|
||||||
eventNames: [...eventNames].sort(),
|
eventNames: [...eventNames].toSorted(),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (eventNames.length === 0) {
|
if (eventNames.length === 0) {
|
||||||
@@ -48,7 +48,7 @@ export function UmamiEventsContent({
|
|||||||
// Collect all unique timestamps across all series
|
// Collect all unique timestamps across all series
|
||||||
const allTimestamps = Array.from(
|
const allTimestamps = Array.from(
|
||||||
new Set(series.flatMap(({ dataPoints }) => dataPoints.map(({ x: xPoint }) => xPoint))),
|
new Set(series.flatMap(({ dataPoints }) => dataPoints.map(({ x: xPoint }) => xPoint))),
|
||||||
).sort();
|
).toSorted();
|
||||||
|
|
||||||
// Build per-event lookup by timestamp string
|
// Build per-event lookup by timestamp string
|
||||||
const byEvent = new Map(
|
const byEvent = new Map(
|
||||||
|
|||||||
Reference in new issue
Block a user