chore: format (#2030)

* chore: format

* chore: add formatter in CI check

---------

Co-authored-by: alex-Arc <omnivox@LAPTOP-RC5SNBVV.localdomain>
This commit is contained in:
Alex Christoffer Rasmussen
2026-03-24 09:49:22 +01:00
committed by GitHub
parent 7e3aaa8c30
commit 73eff20d08
15 changed files with 30 additions and 38 deletions
+4 -5
View File
@@ -9,11 +9,10 @@ import { downloadBlob } from './utils';
const customViewsPath = `${apiEntryUrl}/custom-views`;
export async function getCustomViews(options?: RequestOptions): Promise<CustomViewsListResponse> {
const response =
await axios.get<CustomViewsListResponse>(customViewsPath, {
signal: options?.signal,
timeout: options?.timeout ?? axiosConfig.shortTimeout,
})
const response = await axios.get<CustomViewsListResponse>(customViewsPath, {
signal: options?.signal,
timeout: options?.timeout ?? axiosConfig.shortTimeout,
});
return response.data;
}
@@ -9,10 +9,11 @@ export default function useCssOverride(enabled: boolean) {
queryKey: CSS_OVERRIDE,
queryFn: ({ signal }) => getCSSContents({ signal }),
staleTime: MILLIS_PER_HOUR,
enabled
enabled,
});
return {
data: data ?? '', status
data: data ?? '',
status,
};
}
@@ -105,13 +105,7 @@ export function Field({
);
}
export function Description({
children,
tone = 'default',
}: {
children: ReactNode;
tone?: 'default' | 'warning';
}) {
export function Description({ children, tone = 'default' }: { children: ReactNode; tone?: 'default' | 'warning' }) {
return <div className={cx([style.fieldDescription, tone === 'warning' && style.warningText])}>{children}</div>;
}
@@ -5,8 +5,8 @@ import { IoAdd, IoPencil, IoTrash } from 'react-icons/io5';
import { deleteAutomation } from '../../../../common/api/automation';
import { maybeAxiosError } from '../../../../common/api/utils';
import Button from '../../../../common/components/buttons/Button';
import Info from '../../../../common/components/info/Info';
import IconButton from '../../../../common/components/buttons/IconButton';
import Info from '../../../../common/components/info/Info';
import Tag from '../../../../common/components/tag/Tag';
import useAutomationSettings from '../../../../common/hooks-query/useAutomationSettings';
import * as Panel from '../../panel-utils/PanelUtils';
@@ -55,7 +55,9 @@ export default function TriggersList(props: TriggersListProps) {
<Panel.Divider />
<Panel.Section>
{enabledAutomations === false && (
<Info>Automations are disabled. You can still manage triggers here, but they will not run until enabled.</Info>
<Info>
Automations are disabled. You can still manage triggers here, but they will not run until enabled.
</Info>
)}
{duplicates && (
<Panel.Error>
@@ -9,8 +9,8 @@ import ExternalLink from '../../../../common/components/link/external-link/Exter
import useCustomViews from '../../../../common/hooks-query/useCustomViews';
import * as Panel from '../../panel-utils/PanelUtils';
import CustomViewForm from './CustomViewForm';
import CustomViewsList from './CustomViewsList';
import { customViewsDocs } from './customViews.utils';
import CustomViewsList from './CustomViewsList';
export default function CustomViews() {
const { data, refetch, status } = useCustomViews();
@@ -72,7 +72,6 @@ export default function CustomViews() {
onMutate={() => refetch()}
onError={setActionError}
/>
</Panel.Section>
</Panel.Card>
</Panel.Section>
@@ -25,13 +25,7 @@ export default function CustomViewsList({ views, onOpenUpload, onMutate, onError
<tbody>
{views.length === 0 && <Panel.TableEmpty handleClick={onOpenUpload} label='No custom views yet' />}
{views.map((view, index) => (
<CustomViewsListItem
key={view.slug}
slug={view.slug}
index={index}
onMutate={onMutate}
onError={onError}
/>
<CustomViewsListItem key={view.slug} slug={view.slug} index={index} onMutate={onMutate} onError={onError} />
))}
</tbody>
</Panel.Table>
@@ -1,9 +1,8 @@
import Prism from 'virtual:prismjs';
import { memo } from 'react';
import Editor from 'react-simple-code-editor';
import Prism from 'virtual:prismjs';
import 'prismjs/components/prism-css';
import 'prismjs/themes/prism-tomorrow.min.css';
import style from './StyleEditor.module.scss';
interface CodeEditorProps {
@@ -212,7 +212,7 @@ function GroupTimes() {
const currentGroupId = useCurrentGroupId();
const group = useEntry(currentGroupId) as OntimeGroup | null;
const hasRunningTimer = phase !== TimerPhase.Pending && isPlaybackActive(playback) ;
const hasRunningTimer = phase !== TimerPhase.Pending && isPlaybackActive(playback);
// the group end time does not encode any day offsets so it is calculated with group start time and duration
const plannedGroupEnd = (() => {
@@ -4,9 +4,9 @@ import { Fragment, useCallback, useMemo, useState } from 'react';
import { IoAlertCircle, IoCheckmarkCircle, IoTrash } from 'react-icons/io5';
import Button from '../../../../common/components/buttons/Button';
import IconButton from '../../../../common/components/buttons/IconButton';
import * as Editor from '../../../../common/components/editor-utils/EditorUtils';
import Info from '../../../../common/components/info/Info';
import IconButton from '../../../../common/components/buttons/IconButton';
import Select from '../../../../common/components/select/Select';
import { useEntryActionsContext } from '../../../../common/context/EntryActionsContext';
import useAutomationSettings from '../../../../common/hooks-query/useAutomationSettings';