mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 09:17:23 +00:00
fix: document title of the login page
This commit is contained in:
parent
d18ec0be84
commit
e56d9b8573
@ -2,13 +2,16 @@ import React from 'react';
|
|||||||
import { Link } from 'umi';
|
import { Link } from 'umi';
|
||||||
import { Page } from '@/components/pages';
|
import { Page } from '@/components/pages';
|
||||||
import ViewFactory from '@/components/views';
|
import ViewFactory from '@/components/views';
|
||||||
import { Helmet } from 'umi';
|
import { Helmet, useModel } from 'umi';
|
||||||
|
import get from 'lodash/get';
|
||||||
|
|
||||||
export default (props: any) => {
|
export default (props: any) => {
|
||||||
|
const { initialState = {}, refresh, setInitialState } = useModel('@@initialState');
|
||||||
|
const siteTitle = get(initialState, 'systemSettings.title');
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{'登录 NocoBase'}</title>
|
<title>{siteTitle ? `登录 - ${siteTitle}` : '登录'}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<ViewFactory
|
<ViewFactory
|
||||||
{...props}
|
{...props}
|
||||||
|
@ -2,13 +2,16 @@ import React from 'react';
|
|||||||
import { Link } from 'umi';
|
import { Link } from 'umi';
|
||||||
import { Page } from '@/components/pages';
|
import { Page } from '@/components/pages';
|
||||||
import ViewFactory from '@/components/views';
|
import ViewFactory from '@/components/views';
|
||||||
import { Helmet } from 'umi';
|
import { Helmet, useModel } from 'umi';
|
||||||
|
import get from 'lodash/get';
|
||||||
|
|
||||||
export default (props: any) => {
|
export default (props: any) => {
|
||||||
|
const { initialState = {}, refresh, setInitialState } = useModel('@@initialState');
|
||||||
|
const siteTitle = get(initialState, 'systemSettings.title');
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{'注册 NocoBase'}</title>
|
<title>{siteTitle ? `注册 - ${siteTitle}` : '注册'}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<ViewFactory
|
<ViewFactory
|
||||||
{...props}
|
{...props}
|
||||||
|
Loading…
Reference in New Issue
Block a user