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