'use server'; import React from 'react'; import Link from 'next/link'; import { AccountWithParams } from '@/packages/features/accounts/src/types/accounts'; import { pathsConfig } from '@/packages/shared/src/config'; import { ChevronRight } from 'lucide-react'; import { Trans } from '@kit/ui/makerkit/trans'; import { Button } from '@kit/ui/shadcn/button'; import { Card, CardHeader } from '@kit/ui/shadcn/card'; import { getLatestResponseTime } from '~/lib/utils'; import { loadLifeStyle } from '../../_lib/server/load-life-style'; import { AnalysisResponses } from './types'; const LifeStyleCard = async ({ account, analysisResponses, }: { account: AccountWithParams; analysisResponses?: AnalysisResponses; }) => { const aiResponseTimestamp = getLatestResponseTime(analysisResponses); const { response, dateCreated } = await loadLifeStyle({ account, analysisResponses, aiResponseTimestamp, }); return (
{new Date(dateCreated).toLocaleString()}
{response.summary}
); }; export default LifeStyleCard;