Skip to content

Commit

Permalink
[#3413] fix(web): fix logo error (#3433)
Browse files Browse the repository at this point in the history
<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
   Examples:
     - "[#123] feat(operator): support xxx"
     - "[#233] fix: check null before access result in xxx"
     - "[MINOR] refactor: fix typo in variable name"
     - "[MINOR] docs: fix typo in README"
     - "[#255] test: fix flaky test NameOfTheTest"
   Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->

### What changes were proposed in this pull request?

fix next/image component src issue

### Why are the changes needed?

Fix: #3413

### Does this PR introduce _any_ user-facing change?
Before
<img width="192" alt="image"
src="https://github.com/datastrato/gravitino/assets/9210625/2fb06a60-47fa-4695-b00d-059e54e3ab9a">
After
<img width="179" alt="image"
src="https://github.com/datastrato/gravitino/assets/9210625/d89abfe0-db4e-45ef-9ea5-bd3a2cf2196e">


### How was this patch tested?

smoke test

Co-authored-by: Qian Xia <lauraxiaqian@gmail.com>
  • Loading branch information
jerryshao and LauraXia123 committed May 18, 2024
1 parent 8a15913 commit ebe2de7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions web/src/app/rootLayout/AppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const AppBar = () => {
const dispatch = useAppDispatch()
const [metalakes, setMetalakes] = useState([])
const router = useRouter()
const logoSrc = (process.env.NEXT_PUBLIC_BASE_PATH ?? '') + '/icons/gravitino.svg'

useEffect(() => {
if (!store.metalakes.length && metalake) {
Expand Down Expand Up @@ -69,12 +70,7 @@ const AppBar = () => {
}
>
<Link href='/metalakes' className={'twc-flex twc-items-center twc-no-underline twc-mr-8'}>
<Image
src={process.env.NEXT_PUBLIC_BASE_PATH ?? '' + '/icons/gravitino.svg'}
width={32}
height={32}
alt='logo'
/>
<Image src={logoSrc} overrideSrc={logoSrc} width={32} height={32} alt='logo' />
<Typography
variant='h5'
className={clsx(
Expand Down

0 comments on commit ebe2de7

Please sign in to comment.