0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-03 22:15:32 -05:00

feat(console): set title based on isCloud (#3541)

This commit is contained in:
simeng-li 2023-03-20 15:28:58 +08:00 committed by GitHub
parent d8aa00f7d5
commit 9614edce17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View file

@ -23,8 +23,10 @@ import AppConfirmModalProvider from './contexts/AppConfirmModalProvider';
import AppEndpointsProvider from './contexts/AppEndpointsProvider';
import { AppThemeProvider } from './contexts/AppThemeProvider';
import TenantsProvider, { TenantsContext } from './contexts/TenantsProvider';
import setTitle from './utils/set-title';
void initI18n();
setTitle();
const Content = () => {
const { tenants, isSettle, currentTenantId } = useContext(TenantsContext);

View file

@ -5,7 +5,6 @@
<meta charset="utf-8" />
<link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png">
<link rel="icon" href="./favicon.ico" />
<title>Logto Console</title>
</head>
<body>

View file

@ -0,0 +1,9 @@
import { isCloud } from '../consts/cloud';
const setTitle = () => {
const title = isCloud ? 'Logto Cloud' : 'Logto Console';
// eslint-disable-next-line @silverhand/fp/no-mutation
document.title = title;
};
export default setTitle;