no need to show "select-package" page after onboading if it has nothing

This commit is contained in:
2025-09-10 06:31:32 +03:00
parent 95452de88b
commit 7bc89f7c22

View File

@@ -14,6 +14,7 @@ import { withI18n } from '~/lib/i18n/with-i18n';
import ComparePackagesModal from '../home/(user)/_components/compare-packages-modal';
import { loadAnalysisPackages } from '../home/(user)/_lib/server/load-analysis-packages';
import { redirect } from 'next/navigation';
export const generateMetadata = async () => {
const { t } = await createI18nServerInstance();
@@ -27,6 +28,10 @@ async function SelectPackagePage() {
const { analysisPackageElements, analysisPackages, countryCode } =
await loadAnalysisPackages();
if (analysisPackageElements.length === 0) {
return redirect(pathsConfig.app.home);
}
return (
<div className="container mx-auto my-24 flex flex-col items-center space-y-12">
<MedReportLogo />