import { Title, AppShell, Flex } from "@mantine/core"; import { useLingui } from "@lingui/react"; import { HeaderConfig } from "../types/header-config"; import BackButton from "./back-button"; const Header = ({ collapsed, title, titleValues, withBackButton }: HeaderConfig) => { const { i18n } = useLingui(); const resolvedTitle = typeof title === "string" || title === undefined ? title : i18n._({ ...title, values: titleValues }); return ( { withBackButton && } {resolvedTitle?.toLocaleUpperCase()} ); } export default Header;