Skip to content

Commit e9afdac

Browse files
committed
Format
1 parent 66e28b4 commit e9afdac

File tree

7 files changed

+33
-27
lines changed

7 files changed

+33
-27
lines changed

src/pages/auth/login.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import {
22
Alert,
33
Button,
44
Card,
5-
Divider, Flex,
5+
Divider,
6+
Flex,
67
PasswordInput,
78
Stack,
89
Text,

src/pages/board/[slug].tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import fs from 'fs';
12
import { GetServerSidePropsContext, InferGetServerSidePropsType } from 'next';
3+
import { env } from 'process';
24
import { z } from 'zod';
35
import { Dashboard } from '~/components/Dashboard/Dashboard';
46
import { BoardLayout } from '~/components/layout/Templates/BoardLayout';
@@ -11,12 +13,10 @@ import { getServerSideTranslations } from '~/tools/server/getServerSideTranslati
1113
import { checkForSessionOrAskForLogin } from '~/tools/server/loginBuilder';
1214
import { boardNamespaces } from '~/tools/server/translation-namespaces';
1315
import { api } from '~/utils/api';
14-
import { env } from 'process';
15-
import fs from 'fs';
1616

1717
export default function BoardPage({
1818
config: initialConfig,
19-
isDockerEnabled: isDockerEnabled
19+
isDockerEnabled: isDockerEnabled,
2020
}: InferGetServerSidePropsType<typeof getServerSideProps>) {
2121
useInitConfig(initialConfig);
2222

@@ -65,7 +65,8 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
6565
return result;
6666
}
6767

68-
const isDockerEnabled: boolean = !!env.DOCKER_HOST || !!env.DOCKER_PORT || fs.existsSync('/var/run/docker.sock');
68+
const isDockerEnabled: boolean =
69+
!!env.DOCKER_HOST || !!env.DOCKER_PORT || fs.existsSync('/var/run/docker.sock');
6970

7071
return {
7172
props: {

src/pages/board/index.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
4646
return result;
4747
}
4848

49-
const isDockerEnabled: boolean = !!env.DOCKER_HOST || !!env.DOCKER_PORT || fs.existsSync('/var/run/docker.sock');
49+
const isDockerEnabled: boolean =
50+
!!env.DOCKER_HOST || !!env.DOCKER_PORT || fs.existsSync('/var/run/docker.sock');
5051

5152
return {
5253
props: {

src/utils/auth/ldap.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ type InferrableSearchOptions<
2020
type SearchResultIndex<Attributes extends AttributeConstraint> = Attributes extends string
2121
? Attributes
2222
: Attributes extends readonly string[]
23-
? Attributes[number]
24-
: string;
23+
? Attributes[number]
24+
: string;
2525

2626
type SearchResult<
2727
Attributes extends AttributeConstraint,

src/widgets/notebook/NotebookEditor.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ export function Editor({ widget }: { widget: INotebookWidget }) {
9999
addAttributes() {
100100
return {
101101
...this.parent?.(),
102-
target: { default: null }
103-
}
104-
}
102+
target: { default: null },
103+
};
104+
},
105105
}),
106106
StarterKit,
107107
Table.configure({

src/widgets/smart-home/entity-state/entity-state.widget.tsx

+16-13
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,22 @@ function EntityStateTile({ widget }: SmartHomeEntityStateWidgetProps) {
6868
}
6969
);
7070

71-
const attribute = (widget.properties.appendUnit && data?.attributes.unit_of_measurement ?
72-
" " + data?.attributes.unit_of_measurement : ""
73-
)
74-
75-
const displayName = (widget.properties.displayFriendlyName && data?.attributes.friendly_name ?
76-
data?.attributes.friendly_name : widget.properties.displayName
77-
)
78-
79-
const { mutateAsync: mutateTriggerAutomationAsync } = api.smartHomeEntityState.triggerAutomation.useMutation({
80-
onSuccess: () => {
81-
void utils.smartHomeEntityState.invalidate();
82-
},
83-
});
71+
const attribute =
72+
widget.properties.appendUnit && data?.attributes.unit_of_measurement
73+
? ' ' + data?.attributes.unit_of_measurement
74+
: '';
75+
76+
const displayName =
77+
widget.properties.displayFriendlyName && data?.attributes.friendly_name
78+
? data?.attributes.friendly_name
79+
: widget.properties.displayName;
80+
81+
const { mutateAsync: mutateTriggerAutomationAsync } =
82+
api.smartHomeEntityState.triggerAutomation.useMutation({
83+
onSuccess: () => {
84+
void utils.smartHomeEntityState.invalidate();
85+
},
86+
});
8487

8588
const handleClick = async () => {
8689
if (!widget.properties.automationId) {

tests/pages/auth/login.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('login page', () => {
4040
_i18Next: 'hello',
4141
oidcAutoLogin: null,
4242
oidcProviderName: null,
43-
providers: undefined
43+
providers: undefined,
4444
},
4545
});
4646

@@ -80,7 +80,7 @@ describe('login page', () => {
8080
_i18Next: 'hello',
8181
oidcAutoLogin: null,
8282
oidcProviderName: null,
83-
providers: undefined
83+
providers: undefined,
8484
},
8585
});
8686

@@ -120,7 +120,7 @@ describe('login page', () => {
120120
_i18Next: 'hello',
121121
oidcAutoLogin: null,
122122
oidcProviderName: null,
123-
providers: undefined
123+
providers: undefined,
124124
},
125125
});
126126

0 commit comments

Comments
 (0)