## Description Adds a description field to the PageDTO so that we can add a short description of a page. This will be used to fill the meta tags for internal use case apps for better visibility on Google Fixes #19572 ## Type of change - New feature (non-breaking change which adds functionality)
24 lines
466 B
TypeScript
24 lines
466 B
TypeScript
import React from "react";
|
|
import { Helmet } from "react-helmet";
|
|
|
|
interface Props {
|
|
name?: string;
|
|
description?: string;
|
|
}
|
|
|
|
function AppViewerHtmlTitle(props: Props) {
|
|
const { description, name } = props;
|
|
|
|
// if no name is passed, just return null
|
|
if (!name) return null;
|
|
|
|
return (
|
|
<Helmet>
|
|
<title>{name}</title>
|
|
{description && <meta content={description} name="description" />}
|
|
</Helmet>
|
|
);
|
|
}
|
|
|
|
export default AppViewerHtmlTitle;
|