Skip to content

Commit

Permalink
Merge pull request #287 from Guzzing/bug/275-ui-update
Browse files Browse the repository at this point in the history
UI 전체적으로 업데이트
  • Loading branch information
HeeSeok-kim authored Dec 1, 2023
2 parents e136bf3 + 0ee002f commit 96be610
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 30 deletions.
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
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

0 comments on commit 96be610

Please sign in to comment.