Skip to content

Commit a006bad

Browse files
committed
style: format codebase and update dashboard ui
1 parent 9d163f2 commit a006bad

230 files changed

Lines changed: 21279 additions & 21268 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/app/App.tsx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ import { DashboardLayout } from './features/dashboard/dashboard-layout';
3636
import { DeviceGrid } from './features/dashboard/device-grid';
3737
import { SettingsSection } from './features/settings/components/settings-section';
3838
import {
39-
useCardOrdering,
40-
useCardState,
41-
useDeviceMap,
42-
useEditMode,
43-
useRoomNavigation,
44-
useRoomOrdering,
39+
useCardOrdering,
40+
useCardState,
41+
useDeviceMap,
42+
useEditMode,
43+
useRoomNavigation,
44+
useRoomOrdering,
4545
} from './hooks';
4646
import { useCustomCards } from './hooks/use-custom-cards';
4747
import { useDevices, useRooms } from './hooks/use-devices';
@@ -230,11 +230,7 @@ function Dashboard() {
230230
<DashboardLayout>
231231
{lightDeviceMap.size > 0 ? (
232232
<EditModeProvider value={editModeContextValue}>
233-
<AllViewGrid
234-
deviceMap={lightDeviceMap}
235-
rooms={lightRooms}
236-
cardOrders={cardOrders}
237-
/>
233+
<AllViewGrid deviceMap={lightDeviceMap} rooms={lightRooms} cardOrders={cardOrders} />
238234
</EditModeProvider>
239235
) : (
240236
<EmptyState

src/app/components/figma/ImageWithFallback.tsx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@ import type React from 'react';
22
import { memo, useState } from 'react';
33

44
const ERROR_IMG_SRC =
5-
'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODgiIGhlaWdodD0iODgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvcGFjaXR5PSIuMyIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIzLjciPjxyZWN0IHg9IjE2IiB5PSIxNiIgd2lkdGg9IjU2IiBoZWlnaHQ9IjU2IiByeD0iNiIvPjxwYXRoIGQ9Im0xNiA1OCAxNi0xOCAzMiAzMiIvPjxjaXJjbGUgY3g9IjUzIiBjeT0iMzUiIHI9IjciLz48L3N2Zz4KCg==';
5+
'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODgiIGhlaWdodD0iODgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvcGFjaXR5PSIuMyIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIzLjciPjxyZWN0IHg9IjE2IiB5PSIxNiIgd2lkdGg9IjU2IiBoZWlnaHQ9IjU2IiByeD0iNiIvPjxwYXRoIGQ9Im0xNiA1OCAxNi0xOCAzMiAzMiIvPjxjaXJjbGUgY3g9IjUzIiBjeT0iMzUiIHI9IjciLz48L3N2Zz4KCg==';
66

77
export const ImageWithFallback = memo(function ImageWithFallback(
8-
props: React.ImgHTMLAttributes<HTMLImageElement>
8+
props: React.ImgHTMLAttributes<HTMLImageElement>
99
) {
10-
const [didError, setDidError] = useState(false);
10+
const [didError, setDidError] = useState(false);
1111

12-
const handleError = () => {
13-
setDidError(true);
14-
};
12+
const handleError = () => {
13+
setDidError(true);
14+
};
1515

16-
const { src, alt, style, className, ...rest } = props;
16+
const { src, alt, style, className, ...rest } = props;
1717

18-
return didError ? (
19-
<div
20-
className={`inline-block bg-gray-100 text-center align-middle ${className ?? ''}`}
21-
style={style}
22-
>
23-
<div className="flex items-center justify-center w-full h-full">
24-
<img src={ERROR_IMG_SRC} alt="Failed to load" {...rest} data-original-url={src} />
25-
</div>
26-
</div>
27-
) : (
28-
<img src={src} alt={alt} className={className} style={style} {...rest} onError={handleError} />
29-
);
18+
return didError ? (
19+
<div
20+
className={`inline-block bg-gray-100 text-center align-middle ${className ?? ''}`}
21+
style={style}
22+
>
23+
<div className="flex items-center justify-center w-full h-full">
24+
<img src={ERROR_IMG_SRC} alt="Failed to load" {...rest} data-original-url={src} />
25+
</div>
26+
</div>
27+
) : (
28+
<img src={src} alt={alt} className={className} style={style} {...rest} onError={handleError} />
29+
);
3030
});

0 commit comments

Comments
 (0)