diff --git a/src/admin/AdminAppInsightsClient.tsx b/src/admin/AdminAppInsightsClient.tsx index 0e512f85..52fae8fa 100644 --- a/src/admin/AdminAppInsightsClient.tsx +++ b/src/admin/AdminAppInsightsClient.tsx @@ -2,10 +2,11 @@ import IconGrSync from '@/app-core/IconGrSync'; import Note from '@/components/Note'; +import ScoreCard from '@/components/ScoreCard'; +import ScoreCardRow from '@/components/ScoreCardRow'; import WarningNote from '@/components/WarningNote'; import { dateRangeForPhotos, PhotoDateRange } from '@/photo'; import clsx from 'clsx/lite'; -import { ReactNode } from 'react'; import { HiSparkles } from 'react-icons/hi'; import { PiWarningBold } from 'react-icons/pi'; @@ -54,19 +55,6 @@ export default function AdminAppInsightsClient({ {title} ; - const renderRow = (icon: ReactNode, children: ReactNode) => -
-
- {icon} -
-
- {children} -
-
; - return (
-
- {renderRow( - , - 'This fork is 9 commits behind', - )} - {renderRow( - , - 'Consider enabling rate limiting to mitigate AI abuse', - )} - {renderRow( - , - // eslint-disable-next-line max-len - 'Consider forking this repository to receive new features and fixes', - )} - {renderRow( - , - 'Enable AI text generation in the app configuration', - )} -
+ + + } + > + This fork is 9 commits behind + + } + > + Consider enabling rate limiting to mitigate AI abuse + + } + > + Consider forking this repository to receive new features and fixes + + } + > + Enable AI text generation in the app configuration + + {renderTitle('Code Observability')} {(fork || debug) && }> diff --git a/src/components/ScoreCard.tsx b/src/components/ScoreCard.tsx new file mode 100644 index 00000000..c86bfb9d --- /dev/null +++ b/src/components/ScoreCard.tsx @@ -0,0 +1,13 @@ +import { ReactNode } from 'react'; + +export default function ScoreCard({ + children, +}: { + children: ReactNode, +}) { + return ( +
+ {children} +
+ ); +} diff --git a/src/components/ScoreCardRow.tsx b/src/components/ScoreCardRow.tsx new file mode 100644 index 00000000..716d4e47 --- /dev/null +++ b/src/components/ScoreCardRow.tsx @@ -0,0 +1,29 @@ +import { clsx } from 'clsx'; +import { ReactNode } from 'react'; +export default function ScoreCardRow({ + icon, + children, + details, +}: { + icon: ReactNode + children: ReactNode + details?: string +}) { + return ( +
+
+ {icon} +
+
+ {children} +
+ {details && + + {details} + } +
+ ); +}