Skip to content

Commit

Permalink
fix: sitename title
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Dec 2, 2024
1 parent a58d95f commit ef8b0ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/apple-touch-icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>NEZHA</title>
<script>
(function () {
const storageKey = "vite-ui-theme";
Expand All @@ -29,7 +30,6 @@
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/font-logos@1/assets/font-logos.css"
/>
<title>NEZHA</title>
</head>
<body>
<div id="root"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ function Header() {

const siteName = settingData?.data?.site_name;

useEffect(() => {
document.title = siteName || "NEZHA";
}, [siteName]);

return (
<div className="mx-auto w-full max-w-5xl">
<section className="flex items-center justify-between">
Expand Down

0 comments on commit ef8b0ed

Please sign in to comment.