Skip to content

Commit

Permalink
Fix rendering of spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
soerface committed Nov 12, 2024
1 parent acf5887 commit 3f0d5ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/NavBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@

.navbar ul.nav-links > li > * {
flex: 1;
text-align: right;
}

.navbar ul.nav-links li ul {
Expand Down
6 changes: 5 additions & 1 deletion src/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ function NavBar() {
<span className="title" style={{
lineHeight: "1.1em",
overflow: "hidden",
textAlign: "right",
}}>{auth.user?.profile.preferred_username}</span>
<ul>
<li>
<button onClick={auth.logout}>Logout</button>
</li>
</ul>
</>
const rightItem = auth.user === undefined ? <Spinner/> : auth.user ? userMenu : loginButton;
const alignedSpinner = <span style={{
textAlign: "right",
}}><Spinner/></span>
const rightItem = auth.user === undefined ? alignedSpinner : auth.user ? userMenu : loginButton;
return (
<nav className="navbar">
<Link to="/" className="logo"><img src={fdLogo} alt="fd" onError={
Expand Down

0 comments on commit 3f0d5ec

Please sign in to comment.