style: auto-fix lint and format
This commit is contained in:
1 parent
aa8410d326
commit
d37545c98e
5 files changed
+11
-19
No files matched your search
@@ -32,7 +32,7 @@ export function extractHttpMethods(template: string): string[] {
|
||||
if (/<ToggleSwitch\b/.test(template) && methods.size === 0) methods.add("POST");
|
||||
if (/<SubFetch\b/.test(template) && methods.size === 0) methods.add("GET");
|
||||
}
|
||||
return [...methods].sort();
|
||||
return [...methods].toSorted();
|
||||
}
|
||||
|
||||
const METHOD_COLORS: Record<string, string> = {
|
||||
|
||||
@@ -3,14 +3,7 @@
|
||||
import type { ComponentType, ReactNode } from "react";
|
||||
import { createContext, useCallback, useContext, useEffect, useRef, useState } from "react";
|
||||
import { Alert, Badge, Button, Code, Skeleton, Switch, Text, Title } from "@mantine/core";
|
||||
import {
|
||||
IconAlertTriangle,
|
||||
IconCheck,
|
||||
IconPlayerPlay,
|
||||
IconPower,
|
||||
IconRefresh,
|
||||
IconTrash,
|
||||
} from "@tabler/icons-react";
|
||||
import { IconAlertTriangle, IconCheck, IconPlayerPlay, IconPower, IconRefresh, IconTrash } from "@tabler/icons-react";
|
||||
|
||||
import { clientApi } from "@homarr/api/client";
|
||||
import { useConfirmModal } from "@homarr/modals";
|
||||
@@ -243,7 +236,6 @@ export interface SubDataProps {
|
||||
c?: string;
|
||||
}
|
||||
|
||||
|
||||
export function SubData({ path, as = "Text", ...props }: SubDataProps) {
|
||||
const subData = useContext(SubFetchDataContext);
|
||||
const value = getByPath(subData, path);
|
||||
|
||||
@@ -5,13 +5,7 @@ import { createContext, useContext } from "react";
|
||||
|
||||
const WidgetDefinitionContext = createContext<string>("");
|
||||
|
||||
export function WidgetDefinitionProvider({
|
||||
definitionId,
|
||||
children,
|
||||
}: {
|
||||
definitionId: string;
|
||||
children: ReactNode;
|
||||
}) {
|
||||
export function WidgetDefinitionProvider({ definitionId, children }: { definitionId: string; children: ReactNode }) {
|
||||
return <WidgetDefinitionContext.Provider value={definitionId}>{children}</WidgetDefinitionContext.Provider>;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user