dont render if env is missing
This commit is contained in:
@@ -53,12 +53,20 @@ async function UserHomePage() {
|
|||||||
/>
|
/>
|
||||||
<PageBody>
|
<PageBody>
|
||||||
<Dashboard account={account} bmiThresholds={bmiThresholds} />
|
<Dashboard account={account} bmiThresholds={bmiThresholds} />
|
||||||
<h4>
|
{process.env.OPENAI_API_KEY &&
|
||||||
<Trans i18nKey="dashboard:recommendations.title" />
|
process.env.PROMPT_ID_ANALYSIS_RECOMMENDATIONS && (
|
||||||
</h4>
|
<>
|
||||||
<Suspense fallback={<RecommendationsSkeleton />}>
|
<h4>
|
||||||
<Recommendations account={account} />
|
<Trans i18nKey="dashboard:recommendations.title" />
|
||||||
</Suspense>
|
</h4>
|
||||||
|
<Suspense fallback={<RecommendationsSkeleton />}>
|
||||||
|
<Recommendations account={account} />
|
||||||
|
</Suspense>
|
||||||
|
<Suspense fallback={<RecommendationsSkeleton />}>
|
||||||
|
<Recommendations account={account} />
|
||||||
|
</Suspense>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</PageBody>
|
</PageBody>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user