Skip to content

Commit 89bb0b3

Browse files
committed
refactor(result.server): explicit cms lookup, breadcrumb of flowId
1 parent e3312f1 commit 89bb0b3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/routes/shared/result.server.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { interpolateSerializableObject } from "~/util/fillTemplate";
1717
export const loader = async ({ request, context }: LoaderFunctionArgs) => {
1818
const { pathname } = new URL(request.url);
1919
const { flowId, stepId } = parsePathname(pathname);
20+
const cmsStepId = stepId.replace("ergebnis/", "");
2021
const cookieHeader = request.headers.get("Cookie");
2122

2223
const { userData, debugId } = await getSessionData(flowId, cookieHeader);
@@ -34,10 +35,8 @@ export const loader = async ({ request, context }: LoaderFunctionArgs) => {
3435
return redirect(flowController.getInitial());
3536

3637
const [resultPageContent, parentMeta, defaultStrings] = await Promise.all([
37-
fetchFlowPage("result-pages", flowId, stepId.replace("ergebnis/", "")),
38-
fetchMeta({
39-
filterValue: pathname.substring(0, pathname.lastIndexOf("/")),
40-
}),
38+
fetchFlowPage("result-pages", flowId, cmsStepId),
39+
fetchMeta({ filterValue: flowId }),
4140
fetchTranslations("defaultTranslations"),
4241
]);
4342

0 commit comments

Comments
 (0)