Skip to content

Commit

Permalink
fix: 마이페이지 아이콘 추가 및 토큰 인젝션 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Collection50 committed Jun 11, 2024
1 parent 429da30 commit 4550ccd
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/api/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ axiosInstance.interceptors.request.use(
if (!accessToken) {
return config;
}
config.headers.set(
'Authorization',
`Bearer ${process.env.NEXT_PUBLIC_MASTER_TOKEN}`,
);
config.headers.set('Authorization', `Bearer ${accessToken}`);
return config;
},
(error: AxiosError) => {
Expand Down
29 changes: 29 additions & 0 deletions src/components/Common/Icons/Mypage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { SVGProps } from 'react';

export default function Mypage({ ...props }: SVGProps<SVGSVGElement>) {
return (
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M20 21V19C20 17.9391 19.5786 16.9217 18.8284 16.1716C18.0783 15.4214 17.0609 15 16 15H8C6.93913 15 5.92172 15.4214 5.17157 16.1716C4.42143 16.9217 4 17.9391 4 19V21"
stroke="#212121"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M12 11C14.2091 11 16 9.20914 16 7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7C8 9.20914 9.79086 11 12 11Z"
stroke="#212121"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
);
}
1 change: 1 addition & 0 deletions src/components/Common/Icons/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ export { default as PaginationLeft } from './PaginationLeft';
export { default as PaginationRight } from './PaginationRight';
export { default as UpArrow } from './UpArrow';
export { default as DownArrow } from './DownArrow';
export { default as Mypage } from './Mypage';
6 changes: 5 additions & 1 deletion src/components/MouseImageGallery/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Image from 'next/image';
import Link from 'next/link';
import { MouseEvent, useRef } from 'react';
import { range } from '@/utils';
import { LikeIcon, Trending, Write } from '../Common';
import { LikeIcon, Mypage, Trending, Write } from '../Common';

export default function MouseImageGallery() {
let steps = 0;
Expand Down Expand Up @@ -100,6 +100,10 @@ export default function MouseImageGallery() {
<LikeIcon color="#000" />
</Link>

<Link href="/mypage" className="flex gap-10 z-[100]">
<Mypage />
</Link>

<Link href="/write" className="flex gap-10 z-[100]">
<Write />
</Link>
Expand Down

0 comments on commit 4550ccd

Please sign in to comment.