Titles on index / account pages
Also changed to use `const { ..., name: serverName } = useServer();` where feasible
This commit is contained in:
parent
27f201f27e
commit
d3316f61d7
9 changed files with 30 additions and 19 deletions
|
@ -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) ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue