From 75bf3378e6fcf487db6fd2adbaccc2ff12ca9832 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 1 May 2024 17:10:29 +0200 Subject: [PATCH] fix style issues --- src/frontend/src/components/images/ApiImage.tsx | 2 +- src/frontend/src/components/nav/PageDetail.tsx | 7 +++---- src/frontend/src/defaults/formatters.tsx | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/frontend/src/components/images/ApiImage.tsx b/src/frontend/src/components/images/ApiImage.tsx index 45ec40a832..9f0634cea1 100644 --- a/src/frontend/src/components/images/ApiImage.tsx +++ b/src/frontend/src/components/images/ApiImage.tsx @@ -15,7 +15,7 @@ interface ApiImageProps extends ImageProps { /** * Construct an image container which will load and display the image */ -export function ApiImage(props: ApiImageProps) { +export function ApiImage(props: Readonly) { const { host } = useLocalState.getState(); const imageUrl = useMemo(() => { diff --git a/src/frontend/src/components/nav/PageDetail.tsx b/src/frontend/src/components/nav/PageDetail.tsx index 97a460376a..697e8917a7 100644 --- a/src/frontend/src/components/nav/PageDetail.tsx +++ b/src/frontend/src/components/nav/PageDetail.tsx @@ -61,10 +61,9 @@ export function PageDetail({ {detail} - {badges && - badges.map((badge, idx) => ( - {badge} - ))} + {badges?.map((badge, idx) => ( + {badge} + ))} {actions && ( diff --git a/src/frontend/src/defaults/formatters.tsx b/src/frontend/src/defaults/formatters.tsx index 30a52a5261..4afcf734d5 100644 --- a/src/frontend/src/defaults/formatters.tsx +++ b/src/frontend/src/defaults/formatters.tsx @@ -156,4 +156,4 @@ export function renderDate( } } -export type UiSizeType = MantineSize | (string & {}) | number; +export type UiSizeType = MantineSize | string | number;