generated from imperial/impaas-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: fix logo in dark mode on login page
Co-authored-by: Alexander Biraben-Renard <[email protected]>
- Loading branch information
1 parent
cd26bcb
commit e4beda8
Showing
3 changed files
with
22 additions
and
3 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
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"use client" | ||
|
||
import { useTheme } from "next-themes" | ||
import Image from "next/image" | ||
|
||
const ThemedLogo = () => { | ||
const { resolvedTheme } = useTheme() | ||
let src | ||
|
||
if (resolvedTheme === "dark") { | ||
src = "/images/imperial-logo.svg" | ||
} else { | ||
src = "/images/imperial-logo-blue.svg" | ||
} | ||
|
||
return <Image src={src} alt="imperial logo" width={0} height={0} /> | ||
} | ||
|
||
export default ThemedLogo |