Skip to content

Commit

Permalink
refactor: main page 에서 발생하는 error 및 waring 조치
Browse files Browse the repository at this point in the history
  • Loading branch information
llddang committed Aug 24, 2024
1 parent dc7d3da commit 4c7f857
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion frontend/src/adminComponents/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Header = () => (
<HeaderLayout>
<div style={{ display: 'flex' }}>
<LogoLink href="/admin">
<Image src="/images/logo/SW_logo.svg" alt="SW_logo" width="120" height="40" priority={false} />
<Image src="" alt="SW_logo" width="120" height="40" priority={false} />
</LogoLink>
<Navigator />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const InputUserInfo = () => {
isModerator: data.is_moderator,
}),
);
router.push('/');
},
onError(error, variables, context) {
toast.error(error.message);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/components/ExternalLink/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ const ExternalLink = () => (
{externalLinkInfos.map((link) => {
const markup = { __html: link.title };
return (
<ItemWrapper href={link.url}>
<ItemWrapper key={link.url} href={link.url}>
<ImageWrapper>
<Image src={link.img} alt={link.title} width="50" height="50" priority={false} />
<Image src={link.img} alt={link.title} width="50" height="50" style={{ width: 50, height: 50 }} />
</ImageWrapper>
<ImageTitle dangerouslySetInnerHTML={markup} />
</ItemWrapper>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/components/PnuLink/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ const PnuLink = () => {
loop
>
{pnuLinkInfos.map((link) => (
<SwiperSlide>
<SwiperSlide key={link.url}>
<PnuLinker href={link.url} target="_blank">
<Image width="160" height="50" src={link.img} alt={link.title} />
<Image width="160" height="50" src={link.img} alt={link.title} style={{ width: 'auto', height: 50 }} />
</PnuLinker>
</SwiperSlide>
))}
Expand Down
16 changes: 14 additions & 2 deletions frontend/src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ const Header = () => {
<S.HeaderWrapper>
<S.HeaderDesktopLayout>
<Link href="/" style={{ width: 'fit-content' }}>
<Image src="/images/logo/SW_logo.svg" alt="SW_logo" width="160" height="50" priority={false} />
<Image
src="/images/logo/SW_logo.svg"
alt="SW_logo"
width="160"
height="50"
style={{ width: 160, height: 50 }}
/>
</Link>
<div style={{ display: 'flex', justifyContent: 'center', flexGrow: 1 }}>
{headerInfos.map(
Expand Down Expand Up @@ -62,7 +68,13 @@ const Header = () => {
/>
<S.HeaderTabletLayout>
<Link href="/" style={{ width: 'fit-content', height: '50px', padding: '5px 10px' }}>
<Image src="/images/logo/SW_logo.svg" alt="SW_logo" width="125" height="40" priority={false} />
<Image
src="/images/logo/SW_logo.svg"
alt="SW_logo"
width="125"
height="40"
style={{ width: 125, height: 40 }}
/>
</Link>
<div style={{ display: 'flex' }}>
{auth.isAuth ? (
Expand Down

0 comments on commit 4c7f857

Please sign in to comment.