diff --git a/apps/ui/components/application/ApplicationPage.tsx b/apps/ui/components/application/ApplicationPage.tsx
index 400c5426a..e664a67d5 100644
--- a/apps/ui/components/application/ApplicationPage.tsx
+++ b/apps/ui/components/application/ApplicationPage.tsx
@@ -10,8 +10,8 @@ import {
import { useRouter } from "next/router";
import Stepper, { StepperProps } from "./Stepper";
import NotesWhenApplying from "@/components/application/NotesWhenApplying";
-import { getApplicationPath } from "@/modules/urls";
-import BreadcrumbWrapper from "../common/BreadcrumbWrapper";
+import { applicationsPrefix, getApplicationPath } from "@/modules/urls";
+import { Breadcrumb } from "../common/Breadcrumb";
import { H1 } from "common";
const InnerContainer = styled.div<{ $hideStepper: boolean }>`
@@ -111,9 +111,20 @@ export function ApplicationPageWrapper({
const title = t(`${translationKeyPrefix}.heading`);
const subTitle =
headContent || overrideText || t(`${translationKeyPrefix}.text`);
+
+ const routes = [
+ {
+ slug: applicationsPrefix,
+ title: t("breadcrumb:applications"),
+ },
+ {
+ title: t("breadcrumb:application"),
+ },
+ ] as const;
+
return (
<>
-
{subTitle}
diff --git a/apps/ui/components/common/Breadcrumb.tsx b/apps/ui/components/common/Breadcrumb.tsx index 2357fdb0a..c4d94af5f 100644 --- a/apps/ui/components/common/Breadcrumb.tsx +++ b/apps/ui/components/common/Breadcrumb.tsx @@ -1,7 +1,12 @@ -import React, { ElementType, Fragment } from "react"; +import React from "react"; import styled, { css } from "styled-components"; import { IconAngleLeft, IconAngleRight } from "hds-react"; -import { fontMedium } from "common"; +import { breakpoints, fontMedium } from "common"; +import { useMedia } from "react-use"; +import Link from "next/link"; +import { Flex } from "common/styles/util"; +import { truncatedText } from "common/styles/cssFragments"; +import { useTranslation } from "next-i18next"; export type RouteItem = { title: string; @@ -9,19 +14,10 @@ export type RouteItem = { }; type Props = { - routes: RouteItem[]; - isMobile: boolean; - linkComponent?: ElementType; - className?: string; -}; - -const limits = { - default: 25, - current: 40, + routes: Readonly