Add Helmet
This commit is contained in:
parent
d62ec114ae
commit
b643cdf716
|
@ -21,6 +21,7 @@
|
|||
"react-datasheet": "^1.4.9",
|
||||
"react-device-detect": "^1.17.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-helmet": "^6.1.0",
|
||||
"react-hot-keys": "^2.7.2",
|
||||
"react-i18next": "^11.8.7",
|
||||
"react-papaparse": "3.18.2",
|
||||
|
|
|
@ -541,7 +541,17 @@ class App extends Component {
|
|||
textAlign: "center",
|
||||
}
|
||||
}>
|
||||
Made with <span style={{color: "rgb(255, 255, 255)"}}>❤️</span> by <a style={{fontWeight: "bold", color: "black"}} target="_blank" rel="noreferrer" href="https://casbin.org">Casbin</a>, {Setting.isMobile() ? "Mobile" : "Desktop"} View
|
||||
{
|
||||
Setting.getLanguage() !== "en" ? (
|
||||
<React.Fragment>
|
||||
{Conf.title}
|
||||
</React.Fragment>
|
||||
) : (
|
||||
<React.Fragment>
|
||||
{Conf.titleEn}
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
</Footer>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -40,3 +40,6 @@ export const CasnodeEndpoint = "http://localhost:3000";
|
|||
export const QrCodeImageUrl = "";
|
||||
|
||||
export const ContactInfo = [];
|
||||
|
||||
export const title = "Confita";
|
||||
export const titleEn = "Confita (En)";
|
||||
|
|
|
@ -17,6 +17,8 @@ import {Link, withRouter} from "react-router-dom";
|
|||
import {Alert, Button, Col, Empty, Menu, Popover, Row, Space, Steps} from "antd";
|
||||
import * as Setting from "./Setting";
|
||||
import i18next from "i18next";
|
||||
import * as Conf from "./Conf";
|
||||
import {Helmet} from "react-helmet";
|
||||
|
||||
const {SubMenu} = Menu;
|
||||
const {Step} = Steps;
|
||||
|
@ -209,6 +211,9 @@ class Conference extends React.Component {
|
|||
{/* treeItem.title*/}
|
||||
{/* }*/}
|
||||
{/* </div>*/}
|
||||
<Helmet>
|
||||
<title>{this.props.language !== "en" ? `${treeItem.title} - ${Conf.title}` : `${treeItem.titleEn} - ${Conf.titleEn}`}</title>
|
||||
</Helmet>
|
||||
<div style={{marginTop: "40px"}} dangerouslySetInnerHTML={{__html: this.props.language !== "en" ? treeItem.content : treeItem.contentEn}} />
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -18,6 +18,7 @@ import Conference from "./Conference";
|
|||
import * as ConferenceBackend from "./backend/ConferenceBackend";
|
||||
import * as Setting from "./Setting";
|
||||
import * as Conf from "./Conf";
|
||||
import {Helmet} from "react-helmet";
|
||||
|
||||
class HomePage extends React.Component {
|
||||
constructor(props) {
|
||||
|
@ -87,6 +88,9 @@ class HomePage extends React.Component {
|
|||
|
||||
return (
|
||||
<div>
|
||||
<Helmet>
|
||||
<title>{this.state.language !== "en" ? Conf.title : Conf.titleEn}</title>
|
||||
</Helmet>
|
||||
<div style={{marginBottom: "-8px"}}>
|
||||
{
|
||||
this.renderCarousel(this.state.conference)
|
||||
|
|
|
@ -8013,6 +8013,21 @@ react-error-overlay@^6.0.11:
|
|||
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb"
|
||||
integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==
|
||||
|
||||
react-fast-compare@^3.1.1:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb"
|
||||
integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==
|
||||
|
||||
react-helmet@^6.1.0:
|
||||
version "6.1.0"
|
||||
resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-6.1.0.tgz#a750d5165cb13cf213e44747502652e794468726"
|
||||
integrity sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==
|
||||
dependencies:
|
||||
object-assign "^4.1.1"
|
||||
prop-types "^15.7.2"
|
||||
react-fast-compare "^3.1.1"
|
||||
react-side-effect "^2.1.0"
|
||||
|
||||
react-hot-keys@^2.7.2:
|
||||
version "2.7.2"
|
||||
resolved "https://registry.yarnpkg.com/react-hot-keys/-/react-hot-keys-2.7.2.tgz#7d2b02b7e2cf69182ea71ca01885446ebfae01d2"
|
||||
|
@ -8140,6 +8155,11 @@ react-scripts@5.0.1:
|
|||
optionalDependencies:
|
||||
fsevents "^2.3.2"
|
||||
|
||||
react-side-effect@^2.1.0:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-2.1.2.tgz#dc6345b9e8f9906dc2eeb68700b615e0b4fe752a"
|
||||
integrity sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==
|
||||
|
||||
react@^18.2.0:
|
||||
version "18.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
|
||||
|
|
Loading…
Reference in New Issue