Browse Source
feat: add request-sent, candidate-contact, finding-match, intro, new-match, and request-accepted pages with a reusable page-header component.
front-test-2
feat: add request-sent, candidate-contact, finding-match, intro, new-match, and request-accepted pages with a reusable page-header component.
front-test-2
7 changed files with 67 additions and 45 deletions
-
14src/app/candidate-contact/page.tsx
-
11src/app/finding-match/page.tsx
-
15src/app/intro/page.tsx
-
8src/app/new-match/page.tsx
-
8src/app/request-accepted/page.tsx
-
8src/app/request-sent/page.tsx
-
46src/components/Componentes/page-header.tsx
@ -0,0 +1,46 @@ |
|||
"use client"; |
|||
|
|||
import { useI18n } from "@/translations/provider"; |
|||
import { |
|||
NavigationButton, |
|||
type NavigationButtonProps, |
|||
} from "./navigation-button"; |
|||
|
|||
type PageHeaderProps = { |
|||
className?: string; |
|||
/** Props for the left button. Defaults to icon="back". */ |
|||
leftButton?: NavigationButtonProps; |
|||
/** Props for the right button. Defaults to icon="support" with support label. */ |
|||
rightButton?: NavigationButtonProps; |
|||
}; |
|||
|
|||
export function PageHeader({ |
|||
className, |
|||
leftButton, |
|||
rightButton, |
|||
}: PageHeaderProps) { |
|||
const { dictionary: t } = useI18n(); |
|||
|
|||
return ( |
|||
<header |
|||
className={[ |
|||
"flex items-center justify-between pb-3", |
|||
className, |
|||
] |
|||
.filter(Boolean) |
|||
.join(" ")} |
|||
> |
|||
<NavigationButton icon="back" {...leftButton} /> |
|||
<h1 className="font-faminela text-[20px] font-normal text-foreground"> |
|||
{t.common.appName} |
|||
</h1> |
|||
<NavigationButton |
|||
icon="support" |
|||
iconLabel={t.common.support} |
|||
{...rightButton} |
|||
/> |
|||
</header> |
|||
); |
|||
} |
|||
|
|||
export default PageHeader; |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue