Titles on index / account pages

Also changed to use  `const { ..., name: serverName } = useServer();` where feasible
This commit is contained in:
Charles Morgan 2020-08-01 23:49:00 -04:00
parent 27f201f27e
commit d3316f61d7
No known key found for this signature in database
GPG key ID: D71946CD723249BD
9 changed files with 30 additions and 19 deletions

View file

@ -17,13 +17,12 @@ import GreyRowBox from '@/components/elements/GreyRowBox';
import Button from '@/components/elements/Button';
export default ({ match, history }: RouteComponentProps) => {
const { uuid } = useServer();
const { uuid, name: serverName } = useServer();
const { clearFlashes, addError } = useFlash();
const [ loading, setLoading ] = useState(true);
const [ visible, setVisible ] = useState(false);
const schedules = ServerContext.useStoreState(state => state.schedules.data);
const servername = ServerContext.useStoreState(state => state.server.data.name);
const setSchedules = ServerContext.useStoreActions(actions => actions.schedules.setSchedules);
useEffect(() => {
@ -40,7 +39,7 @@ export default ({ match, history }: RouteComponentProps) => {
return (
<PageContentBlock>
<Helmet>
<title> {servername} | Schedules </title>
<title> {serverName} | Schedules </title>
</Helmet>
<FlashMessageRender byKey={'schedules'} css={tw`mb-4`}/>
{(!schedules.length && loading) ?