-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* header, footer and background refactor for light theme * header, footer and background refactor for dark theme * patch logo * restyle error page * replace footer background image with css pseduo element * remove dark selector * use twjoin * use default tailwind value * Update src/app/components/Header/Header.tsx Co-authored-by: David Totrashvili <[email protected]> --------- Co-authored-by: David Totrashvili <[email protected]>
- Loading branch information
Showing
11 changed files
with
96 additions
and
108 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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
/playwright-report/ | ||
/blob-report/ | ||
/playwright/.cache/ | ||
/out/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,31 +1,13 @@ | ||
import { useTheme } from "next-themes"; | ||
import Image from "next/image"; | ||
import { useEffect, useState } from "react"; | ||
|
||
import darkLogo from "@/app/assets/logo-black.svg"; | ||
import lightLogo from "@/app/assets/logo-white.svg"; | ||
import logo from "@/app/assets/logo-white.svg"; | ||
|
||
interface LogoProps {} | ||
|
||
export const Logo: React.FC<LogoProps> = () => { | ||
const [mounted, setMounted] = useState(false); | ||
const { resolvedTheme } = useTheme(); | ||
const lightSelected = resolvedTheme === "light"; | ||
|
||
// useEffect only runs on the client, so now we can safely show the UI | ||
useEffect(() => { | ||
setMounted(true); | ||
}, []); | ||
|
||
// uses placeholder of babylon logo with primary color | ||
// since before theme is resolved, we don't know which logo to show | ||
if (!mounted) { | ||
return <div className="h-[40px] w-[159px]" />; | ||
} | ||
|
||
return ( | ||
<div className="flex"> | ||
<Image src={lightSelected ? darkLogo : lightLogo} alt="Babylon" /> | ||
<Image src={logo} alt="Babylon" /> | ||
</div> | ||
); | ||
}; |
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
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