interface: put dynamic title on inbox

fixes https://github.com/urbit/landscape/issues/222
This commit is contained in:
Tyler Brown Cifu Shuster 2021-01-08 10:32:20 -08:00
parent 71f16fc32b
commit 7ce3fd49eb

View File

@ -2,6 +2,7 @@ import React, { useCallback, useState } from "react";
import _ from 'lodash';
import { Box, Col, Text, Row } from "@tlon/indigo-react";
import { Link, Switch, Route } from "react-router-dom";
import Helmet from "react-helmet";
import { Body } from "~/views/components/Body";
import { PropFunc } from "~/types/util";
@ -52,6 +53,10 @@ export default function NotificationsScreen(props: any) {
render={(routeProps) => {
const { view } = routeProps.match.params;
return (
<>
<Helmet defer={false}>
<title>{ props.notificationsCount ? `(${String(props.notificationsCount) }) `: '' }Landscape - Notifications</title>
</Helmet>
<Body>
<Col overflowY="hidden" height="100%">
<Row
@ -120,6 +125,7 @@ export default function NotificationsScreen(props: any) {
{!view && <Inbox {...props} filter={filter.groups} />}
</Col>
</Body>
</>
);
}}
/>