-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b3940b
commit 11dca26
Showing
1 changed file
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
import logo from "@public/images/cloudflare.svg"; | ||
import { memo, useMemo } from 'react'; | ||
import logoSrc from "@public/images/cloudflare.svg"; | ||
|
||
export const Header = () => ( | ||
<div> | ||
<nav className="navbar navbar-light bg-light mb-1"> | ||
<div className="container-fluid"> | ||
<span className="navbar-brand h1">Cloudflare React Worker</span> | ||
</div> | ||
</nav> | ||
<img src={ logo } width="200" alt="logo"/> | ||
<br/> | ||
</div> | ||
); | ||
export const Header = memo(() => { | ||
const logo = useMemo(() => logoSrc, []); | ||
|
||
return ( | ||
<div> | ||
<nav className="navbar navbar-light bg-light mb-1"> | ||
<div className="container-fluid" style={ { height: "50px" } }> | ||
<span className="navbar-brand h1">Cloudflare React Worker</span> | ||
<span style={ { position: "relative", right: 0 } }> | ||
<img src={ logo } width="151" height="50" alt="logo"/> | ||
</span> | ||
</div> | ||
</nav> | ||
<br/> | ||
</div> | ||
); | ||
}); |