PromucFlow_constructor/app/client/src/pages/AppViewer/AppViewerHtmlTitle.tsx
Hetu Nandu 205adeea37
feat: Add a description field for pages (#19573)
## 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)
2023-01-15 00:58:02 +05:30

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;