Skip to content

Commit 5f62c5a

Browse files
committed
fix: handle missing tenant by showing common home page
When tenant is not found, display CommonHomePage instead of redirecting to tenant selection. This provides a better user experience for invalid subdomains.
1 parent 1798791 commit 5f62c5a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/(frontend)/[...slugs]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export default async function Page(params: Args) {
8787
const tenant = await getTenantBySubDomain(subdomain);
8888

8989
if (!tenant) {
90-
redirect(tenantSelectionHref);
90+
return <CommonHomePage />;
9191
}
9292

9393
const { title, description, navigation, footer } =

src/app/(frontend)/[entitySlug]/promises/[promiseId]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export default async function PromiseDetailPage({
170170
const tenant = await getTenantBySubDomain(subdomain);
171171

172172
if (!tenant) {
173-
redirect(tenantSelectionHref);
173+
return <CommonHomePage />;
174174
}
175175

176176
const { title, description, navigation, footer } =

0 commit comments

Comments
 (0)