Skip to content

Commit c28355a

Browse files
Merge pull request #276 from ItRecode/develop
[develop] 상용서버 배포
2 parents 8ec8497 + 434456a commit c28355a

36 files changed

Lines changed: 724 additions & 278 deletions

src/apis/auth.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ export const getIsDuplicatedNickname = (nickname: string) => {
2323
export const logout = () => {
2424
return baseInstance.post(`/member/logout`)
2525
}
26+
27+
export const withdrawUser = () => {
28+
return baseInstance.delete(`/member/delete`)
29+
}

src/assets/close_icon.svg

Lines changed: 3 additions & 0 deletions
Loading

src/assets/heart_large.svg

Lines changed: 9 additions & 0 deletions
Loading

src/assets/moon_large.svg

Lines changed: 9 additions & 0 deletions
Loading

src/components/Alert.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ export default function Alert({
3030
<Modal visible={visible} onClose={onClose}>
3131
<div className="flex h-auto w-[270px] flex-col justify-center">
3232
<div className="flex flex-col items-center justify-center border-b border-grey-2 py-6 text-center">
33-
<div className="text-base font-semibold leading-6">{mainMessage}</div>
33+
<div className="text-[18px] font-semibold leading-[24px]">
34+
{mainMessage}
35+
</div>
3436
{subMessage && (
35-
<div className="pt-4 text-xs font-medium text-grey-8">
37+
<div className="pt-4 text-[12px] font-medium leading-[18px] text-grey-8">
3638
{subMessage}
3739
</div>
3840
)}

src/components/BackButton.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import React from 'react'
22
import { ReactComponent as Back } from '@assets/back.svg'
33
import { useNavigate } from 'react-router-dom'
44

5-
function BackButton({ onClick }: { onClick?: () => void }) {
5+
const BackButton = React.memo(function BackBtn({
6+
onClick,
7+
}: {
8+
onClick?: () => void
9+
}) {
610
const navigate = useNavigate()
711

812
const handleLocateBack = () => {
@@ -18,6 +22,6 @@ function BackButton({ onClick }: { onClick?: () => void }) {
1822
}
1923

2024
return <Back className="cursor-pointer" onClick={handleLocateBack} />
21-
}
25+
})
2226

2327
export default BackButton

src/components/Chip.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@ function Chip({
4848
`}
4949
>
5050
{icon && (
51-
<img className="mr-2 aspect-square w-[14px] object-cover" src={icon} />
51+
<div className="mr-2 aspect-square w-[14px]">
52+
<img
53+
className="h-full w-full object-cover"
54+
src={icon}
55+
alt={message}
56+
/>
57+
</div>
5258
)}
5359
<p className="flex items-center text-[14px] leading-none">{message}</p>
5460
</button>

src/components/Loading.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import React from 'react'
22
import Spinner from './Spinner'
33

4-
export default function Loading() {
4+
const Loading = React.memo(function LoadingComponent() {
55
return (
66
<div className="flex h-full flex-col items-center justify-center">
77
<Spinner size="large" />
88
<h3 className="mt-8 text-base font-medium">로딩 중 이에요</h3>
99
<p className="mt-3 text-xs">잠시만 기다려 주세요</p>
1010
</div>
1111
)
12-
}
12+
})
13+
14+
export default Loading

src/components/Navbar.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
import React from 'react'
1+
import React, { Suspense } from 'react'
22
import { ReactComponent as Record_icon } from '@assets/nav_icons/record_icon.svg'
33
import { Outlet, useNavigate } from 'react-router-dom'
44
import NavbarItem from './NavbarItem'
5+
import Loading from './Loading'
56

6-
export default function NavBar() {
7+
function NavBar() {
78
const navigate = useNavigate()
89

910
return (
1011
<>
11-
<Outlet />
12+
<Suspense fallback={<Loading />}>
13+
<Outlet />
14+
</Suspense>
1215
<nav className="fixed bottom-0 z-20 flex h-[60px] w-full max-w-[420px] justify-between rounded-t-xl border border-solid border-grey-3 bg-white px-3 pt-1.5">
1316
<nav className="left-3 flex">
1417
<NavbarItem pageName="홈" linkSrc="/" className="mr-5" />
@@ -30,3 +33,5 @@ export default function NavBar() {
3033
</>
3134
)
3235
}
36+
37+
export const MemoizedNavbar = React.memo(NavBar)

src/components/NavbarItem.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,28 @@ export default function NavbarItem({
4343
return (
4444
<Home_icon
4545
className={`${iconFormat} ${checkPathWithIconImg(linkSrc)}`}
46+
aria-label={pageName}
4647
/>
4748
)
4849
case '/collect':
4950
return (
5051
<Rank_icon
5152
className={`${iconFormat} ${checkPathWithIconImg(linkSrc)}`}
53+
aria-label={pageName}
5254
/>
5355
)
5456
case '/myrecord':
5557
return (
5658
<MyRecord_icon
5759
className={`${iconFormat} ${checkPathWithIconImg(linkSrc)}`}
60+
aria-label={pageName}
5861
/>
5962
)
6063
case '/setting':
6164
return (
6265
<Setting_icon
6366
className={`${iconFormat} ${checkPathWithIconImg(linkSrc)}`}
67+
aria-label={pageName}
6468
/>
6569
)
6670
}

0 commit comments

Comments
 (0)