no need to show "select-package" page after onboading if it has nothing
This commit is contained in:
@@ -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 />
|
||||
|
||||
Reference in New Issue
Block a user