Skip to content

Commit 3a7cb92

Browse files
authored
Merge pull request #147 from guanweiwang/main
fix: the logo is placed in a static resource
2 parents 6ea0dfa + 767f792 commit 3a7cb92

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed
File renamed without changes.

src/components/Header/index.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import React, { useEffect, useState } from 'react';
44
import { Box, AppBar, Stack, Link, Button } from '@mui/material';
5+
import logoSvg from '@/asset/img/logo.svg';
6+
import Image from 'next/image';
57

68
import Search from './search';
79

@@ -55,14 +57,14 @@ const Header = () => {
5557
justifyContent='space-between'
5658
>
5759
<Stack direction='row' alignItems='center'>
58-
<Box
59-
component='img'
60-
src='/tools/logo.svg'
60+
<Image
61+
src={logoSvg}
62+
alt=''
6163
onClick={() => {
6264
window.open('/', '_self');
6365
}}
64-
sx={{ ml: 5, mr: 10, cursor: 'pointer' }}
65-
/>
66+
style={{ marginLeft: 40, marginRight: 80, cursor: 'pointer' }}
67+
></Image>
6668

6769
<Stack direction='row' gap={5} alignItems='center'>
6870
{NAV_LINK.map((item) => (

0 commit comments

Comments
 (0)