'use client'; import IconGrSync from '@/app-core/IconGrSync'; import Note from '@/components/Note'; import WarningNote from '@/components/WarningNote'; import { dateRangeForPhotos, PhotoDateRange } from '@/photo'; import clsx from 'clsx/lite'; import { HiSparkles } from 'react-icons/hi'; type Recommendation = 'fork' | 'forkBehind' | 'ai' | 'aiRateLimiting'; export default function AdminAppInsightsClient({ recommendations: { fork, forkBehind, ai, aiRateLimiting, }, photoStats: { photosCount, tagsCount, camerasCount, filmSimulationsCount, lensesCount, dateRange, }, debug, }: { recommendations: Record, photoStats: { photosCount: number tagsCount: number camerasCount: number filmSimulationsCount: number lensesCount: number dateRange?: PhotoDateRange }, debug?: boolean, }) { const { descriptionWithSpaces } = dateRangeForPhotos(undefined, dateRange); const renderTitle = (title: string) =>
{title}
; return (
{renderTitle('Code Observability')} {(fork || debug) && }> Consider forking this repository in order to receive new features and fixes } {(forkBehind || debug) && This fork is 9 commits behind } {renderTitle('Template Recommendations')} {(ai || debug) && }> Enable AI text generation in the app configuration } {(aiRateLimiting || debug) && Consider enabling rate limiting to mitigate AI abuse } {renderTitle('Library Stats')}
Photos
{photosCount}
Tags
{tagsCount}
Cameras
{camerasCount}
Films
{filmSimulationsCount}
Lenses
{lensesCount}
{descriptionWithSpaces}
); }