Merged
Conversation
fix: custom applogo not visible in header
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Pull Request Overview
This PR ensures the custom application logo displays correctly in the header by introducing theme detection and conditional logo rendering.
- Reformats the return value of
getAppLogo(no functional change). - Adds
isDarkThemestate inHeader.jsxto switch between light and dark logos. - Updates the
<img>tag to choose a static dark-mode logo when needed.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| apps/OpenSign/src/constant/Utils.jsx | Reformatted object return in getAppLogo for readability. |
| apps/OpenSign/src/components/Header.jsx | Introduced theme state & mutation observer; conditional logo rendering. |
Comments suppressed due to low confidence (2)
apps/OpenSign/src/components/Header.jsx:93
- [nitpick] This local variable shadows the component state
isDarkTheme. Consider renaming it (e.g.,isDarkMode) to avoid confusion.
const isDarkTheme =
apps/OpenSign/src/components/Header.jsx:131
- The
classNameattribute was removed from the<img>tag, which may break the intended styling. Re-add the previousclassName(e.g.,object-contain h-full w-auto).
/>
| const image = localStorage.getItem("profileImg") || dp; | ||
| const [isOpen, setIsOpen] = useState(false); | ||
| const [applogo, setAppLogo] = useState(""); | ||
| const [isDarkTheme, setIsDarkTheme] = useState(); |
There was a problem hiding this comment.
Initialize isDarkTheme with a default boolean (e.g., useState(false)) to avoid an undefined state on first render.
Suggested change
| const [isDarkTheme, setIsDarkTheme] = useState(); | |
| const [isDarkTheme, setIsDarkTheme] = useState(false); |
| isDarkTheme | ||
| ? "/static/js/assets/images/logo-dark.png" | ||
| : applogo | ||
| } |
There was a problem hiding this comment.
Add an alt attribute to the <img> tag for accessibility, for example alt="App logo".
Suggested change
| } | |
| } | |
| alt="App logo" |
prafull-opensignlabs
approved these changes
Jul 7, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: custom applogo not visible in header