From 38c487b54f0bf8ec12b31d904b771f1d72643829 Mon Sep 17 00:00:00 2001 From: Danel Kungla Date: Fri, 24 Oct 2025 09:35:35 +0300 Subject: [PATCH] code fix --- app/home/(user)/(dashboard)/life-style/page.tsx | 12 +----------- app/home/(user)/_components/ai/ai-blocks.tsx | 1 + app/home/(user)/_components/ai/recommendations.tsx | 4 +--- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/app/home/(user)/(dashboard)/life-style/page.tsx b/app/home/(user)/(dashboard)/life-style/page.tsx index e359c73..97862ab 100644 --- a/app/home/(user)/(dashboard)/life-style/page.tsx +++ b/app/home/(user)/(dashboard)/life-style/page.tsx @@ -1,7 +1,5 @@ import React from 'react'; -import { createUserAnalysesApi } from '@/packages/features/user-analyses/src/server/api'; -import { getSupabaseServerClient } from '@/packages/supabase/src/clients/server-client'; import { Circle } from 'lucide-react'; import { cn } from '@kit/ui/lib/utils'; @@ -29,11 +27,6 @@ export async function generateMetadata() { } async function LifeStylePage() { - const supabaseClient = getSupabaseServerClient(); - const userAnalysesApi = createUserAnalysesApi(supabaseClient); - - const analysisResponses = await userAnalysesApi.getAllUserAnalysisResponses(); - console.log('analysisResponses', analysisResponses); const { account } = await loadCurrentUserAccount(); if (!account) { return null; @@ -60,10 +53,7 @@ async function LifeStylePage() {
{data.lifestyle.map(({ title, description, score }, index) => ( -
+

{title}

; } + if (analysisResponses?.length === 0) { return ( <> diff --git a/app/home/(user)/_components/ai/recommendations.tsx b/app/home/(user)/_components/ai/recommendations.tsx index 7208d36..10b6ef8 100644 --- a/app/home/(user)/_components/ai/recommendations.tsx +++ b/app/home/(user)/_components/ai/recommendations.tsx @@ -25,8 +25,6 @@ export default async function Recommendations({ } return ( - <> - - + ); }