Skip to content

Commit 60f1d9c

Browse files
committed
refactor: add default logo
1 parent 06f7163 commit 60f1d9c

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

client/src/components/Header/index.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,19 @@ export const Header: React.FC<HeaderProps> = ({ setting, tags, pages, hasBg = fa
179179
</a>
180180
</Link>
181181
) : (
182-
<Link href="/" scroll={false}>
183-
<a aria-label="home" dangerouslySetInnerHTML={{ __html: setting.systemLogo }}></a>
184-
</Link>
185-
)}
182+
<Link href="/" scroll={false}>
183+
{
184+
setting.systemLogo
185+
?
186+
<a aria-label="home" dangerouslySetInnerHTML={{ __html: setting.systemLogo }}></a>
187+
:
188+
<a aria-label="home">
189+
<img height="36" src="/logo.png" alt="logo" />
190+
</a>
191+
}
192+
193+
</Link>
194+
)}
186195
</div>
187196

188197
{/* Mobile Menu Trigger */}
@@ -213,8 +222,8 @@ export const Header: React.FC<HeaderProps> = ({ setting, tags, pages, hasBg = fa
213222
<nav className={cls(visible ? style.active : false)}>
214223
<ul>
215224
<li className={style.toolWrapper}>
216-
<SearchOutlined
217-
style={{ cursor: 'pointer' }}
225+
<SearchOutlined
226+
style={{ cursor: 'pointer' }}
218227
onClick={toggleSearch}
219228
aria-label="Search"
220229
/>

0 commit comments

Comments
 (0)