Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI 전체적으로 업데이트 #287

Merged
merged 8 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/common/informationBox/InformationBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const InformationBox = ({
'p-[14px] w-[345px] h-[120px] font-nsk overflow-hidden rounded-[10px] bg-white-0'
}>
<div className={'w-full h-full flex items-center'}>
<Profile imageSize={'M'} canEdit={true} imageUrl={imageUrl} />
<Profile imageSize={'M'} canEdit={false} imageUrl={imageUrl} />
<div
className={
'relative w-[240px] h-full pl-[17px] flex flex-col justify-center gap-[5px]'
Expand Down
17 changes: 14 additions & 3 deletions src/pages/likeAcademy/LikeAcademy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const LikeAcademy = () => {
<Spacing size={90} />
<SettingPage isOpen={toggleOpen} />
<div className={'overflow-auto h-[600px]'}>
{likeAcademies?.likeAcademyInfos &&
{likeAcademies?.likeAcademyInfos.length ? (
likeAcademies.likeAcademyInfos?.map(
({ likeId, academyId, academyName, expectedFee }, index) => (
<li
Expand All @@ -72,7 +72,12 @@ const LikeAcademy = () => {
}
/>
<div className={'ml-[50px] my-[5px]'}>
<p className={'subHead-18'}>{academyName}</p>
<p
className={
'subHead-18 w-[80%] text-ellipsis overflow-hidden whitespace-nowrap'
}>
{academyName}
</p>
<p>
{'예상 교육비'}
<span
Expand Down Expand Up @@ -102,7 +107,13 @@ const LikeAcademy = () => {
/>
</li>
)
)}
)
) : (
<div className={'flex justify-center items-center'}>
<Spacing size={600} />
<p className={'body-18-gray'}>{'찜한 학원이 아직 없습니다'}</p>
</div>
)}

<div
className={
Expand Down
3 changes: 3 additions & 0 deletions src/pages/login/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import { getItem } from '@/libs/utils/storage'

const LoginPage = () => {
const navigate = useNavigate()
useEffect(() => {
if (getItem('token').length > 0) navigate('/')
}, [])
useEffect(() => {
const req = async () => {
try {
Expand Down
34 changes: 16 additions & 18 deletions src/pages/map/MapPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,23 @@ const MapPage = () => {
return (
<div className={'bg-white-100 w-full h-full relative overflow-hidden'}>
<SettingPage isOpen={toggleOpen} />
<div>
<Spacing size={80} />
<MapSearchBar />
<NaverMap
academyList={
academyList?.academiesByLocationResponse ||
academyFilterList?.academyFilterResponses ||
[]
}
<Spacing size={80} />
<MapSearchBar />
<NaverMap
academyList={
academyList?.academiesByLocationResponse ||
academyFilterList?.academyFilterResponses ||
[]
}
/>
{selectAcademy.isBottomSheet && (
<BottomSheet
title={selectAcademy.academy.academyName}
address={selectAcademy.academy.address}
number={selectAcademy.academy.contact}
academyId={selectAcademy.academy.academyId}
/>
{selectAcademy.isBottomSheet && (
<BottomSheet
title={selectAcademy.academy.academyName}
address={selectAcademy.academy.address}
number={selectAcademy.academy.contact}
academyId={selectAcademy.academy.academyId}
/>
)}
</div>
)}
</div>
)
}
Expand Down
44 changes: 18 additions & 26 deletions src/pages/mypage/MyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,26 @@ const MyPage = () => {
}
/>
</div>
<div className={'flex overflow-x-scroll'}>
<div className={'flex overflow-x-scroll flex-start'}>
{data?.childInformationResponses.length === 0 ? (
<p>{'🥲아직 아이를 등록하지 않으셨습니다...'}</p>
) : (
<ul
className={
'list-none flex-shrink-0 flex justify-start items-center'
}>
{data?.childInformationResponses.map((childInfo) => (
<li key={childInfo.childId} className={'px-10'}>
<Profile
imageSize={'M'}
imageUrl={childInfo.childProfileImageUrl}
canEdit={true}
onClick={() =>
navigate(`/edit/${childInfo.childId}`, {
state: { childId: childInfo.childId }
})
}
/>
</li>
))}
<ul className={'list-none flex-shrink-0 flex flex-start'}>
{data?.childInformationResponses.map(
({ childId, childName, childProfileImageUrl }) => (
<li key={childId} className={'px-2'}>
<Profile
imageSize={'M'}
imageUrl={childProfileImageUrl}
imageLabel={childName}
canEdit={true}
onClick={() =>
navigate(`/edit/${childId}`, {
state: childId
})
}
/>
</li>
</ul>
)}
</div>
Expand Down Expand Up @@ -126,13 +124,7 @@ const MyPage = () => {
/>
<Button
label={'예'}
onClick={() => {
withdrawUserApi()
setToast({
comment: '회원 탈퇴가 완료되었어요.',
type: 'success'
})
}}
onClick={() => withdrawUserApi()}
buttonType={'Plain-red'}
/>
</div>
Expand Down