diff --git a/frontend/app/src/layouts/producer/AuthenticatedLayout.tsx b/frontend/app/src/layouts/producer/AuthenticatedLayout.tsx index 3441474..90c7dc5 100644 --- a/frontend/app/src/layouts/producer/AuthenticatedLayout.tsx +++ b/frontend/app/src/layouts/producer/AuthenticatedLayout.tsx @@ -100,11 +100,11 @@ export default function AuthenticatedLayout() { if (!authenticationService.isAuthenticated()) { return - } - if (authenticatedAsCustomer) { + } else if (authenticatedAsCustomer) { return + } else { + return getAuthenticatedLayout() } - return getAuthenticatedLayout() } export async function loadAuthenticatedLayoutData(keycloak): Promise<{isAuthenticatedAsCustomer: boolean, environmentType: {label: String, color: String} | undefined}> {