fix: document title of the login page

This commit is contained in:
chenos 2021-03-17 09:53:25 +08:00
parent d18ec0be84
commit e56d9b8573
2 changed files with 10 additions and 4 deletions

View File

@ -2,13 +2,16 @@ import React from 'react';
import { Link } from 'umi';
import { Page } from '@/components/pages';
import ViewFactory from '@/components/views';
import { Helmet } from 'umi';
import { Helmet, useModel } from 'umi';
import get from 'lodash/get';
export default (props: any) => {
const { initialState = {}, refresh, setInitialState } = useModel('@@initialState');
const siteTitle = get(initialState, 'systemSettings.title');
return (
<div>
<Helmet>
<title>{'登录 NocoBase'}</title>
<title>{siteTitle ? `登录 - ${siteTitle}` : '登录'}</title>
</Helmet>
<ViewFactory
{...props}

View File

@ -2,13 +2,16 @@ import React from 'react';
import { Link } from 'umi';
import { Page } from '@/components/pages';
import ViewFactory from '@/components/views';
import { Helmet } from 'umi';
import { Helmet, useModel } from 'umi';
import get from 'lodash/get';
export default (props: any) => {
const { initialState = {}, refresh, setInitialState } = useModel('@@initialState');
const siteTitle = get(initialState, 'systemSettings.title');
return (
<div>
<Helmet>
<title>{'注册 NocoBase'}</title>
<title>{siteTitle ? `注册 - ${siteTitle}` : '注册'}</title>
</Helmet>
<ViewFactory
{...props}