'use client'; 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 { HiSparkles } from 'react-icons/hi'; import { MdLightbulbOutline } from 'react-icons/md'; import { PiWarningBold } from 'react-icons/pi'; 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 (
} content="This fork is 9 commits behind" additionalContent={<> Sync your fork to receive new features and fixes } /> } content="AI enabled without rate limiting" // eslint-disable-next-line max-len additionalContent="Create Vercel KV store and link it to this project in order to enable rate limiting." /> } // eslint-disable-next-line max-len content="You seem to have several vertical photos—consider enabling matting to make portrait and landscape photos appear more consistent" additionalContent={<> Enabled photo matting by setting `NEXT_PUBLIC_MATTE_PHOTOS = 1` } /> } // eslint-disable-next-line max-len content="Consider forking this repository to receive new features and fixes" /> } content="Enable AI text generation in the app configuration" /> {renderTitle('Code Observability')} {(fork || debug) && }> Consider forking this repository 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}
); }