/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ import React from "react"; import { useDateTimeFormatter } from "../hooks"; import { useTranslation } from "react-i18next"; import MarkdownRender from "../components/MarkdownRender"; interface Props { name?: string; topicAreaName?: string; description?: string; unpublished?: boolean; isMobile?: boolean; link?: React.ReactNode; lastUpdated?: Date; } function DashboardHeader(props: Props) { const dateFormatter = useDateTimeFormatter(); const { t } = useTranslation(); return (

{props.name}

{props.topicAreaName} {props.lastUpdated && ` | ${t("LastUpdatedLabel")} ${dateFormatter(props.lastUpdated)}`}
{props.description && ( )}
{props.link}
); } export default DashboardHeader;