Skip to content

Commit

Permalink
feat: 프로필 페이지 UI 제작
Browse files Browse the repository at this point in the history
  • Loading branch information
bottlewook committed Jan 16, 2024
1 parent a3c7dd2 commit eb78129
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 4 deletions.
18 changes: 18 additions & 0 deletions src/app/my-page/page.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.loginDescriptionWrapper {
padding: 0 24px;
}

.titleWrapper {
padding: 16px 24px;
}

.nameWrapper {
padding: 16px 24px;
}

.linkInfoContainer {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 24px;
}
67 changes: 67 additions & 0 deletions src/app/my-page/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import classNames from 'classnames/bind';
import Link from 'next/link';

import BottomNav from '@/components/shared/bottom-nav/BottomNav';
import Button from '@/components/shared/button/Button';
import LinkArrow from '@components/icons/LinkArrow';
import Spacing from '@components/shared/spacing/Spacing';
import Text from '@components/shared/text/Text';
import Title from '@components/shared/title/Title';

import styles from './page.module.scss';

const cx = classNames.bind(styles);

function MyProfilePage() {
const name = 'washpedia';
const isLoggedIn = true;

if (isLoggedIn === true) {
return (
<>
<Spacing size={220} />
<div className={cx('loginDescriptionWrapper')}>
<Title
title={'로그인 후\n이용해 주세요.'}
description={'로그인 후 내 차량 정보와 세차 정보를\n등록해 보세요.'}
descriptionColor="tertiary"
/>
<Spacing size={260} />
<Button size="large" full>로그인 하기</Button>
</div>
<BottomNav />
</>
);
}

return (
<>
<Spacing size={20} />
<div className={cx('titleWrapper')}>
<Title title="프로필" titleSize="t3" />
</div>
<div className={cx('nameWrapper')}>
<Text typography="t4">{`${name} 님 안녕하세요!`}</Text>
</div>
<Spacing size={8} backgroundColor="tertiary300" />
<Spacing size={120} />
<ul>
<li className={cx('linkInfoContainer')}>
<Link href="/">나의 차량 정보</Link>
<LinkArrow />
</li>
<li className={cx('linkInfoContainer')}>
<Link href="/">나의 세차 정보</Link>
<LinkArrow />
</li>
<li className={cx('linkInfoContainer')}>
<Link href="/">리뷰 관리</Link>
<LinkArrow />
</li>
</ul>
<BottomNav />
</>
);
}

export default MyProfilePage;
10 changes: 6 additions & 4 deletions src/components/shared/title/Title.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
import { Typography } from '@/styles/typography';
import Flex from '@shared/flex/Flex';
import Spacing from '@shared/spacing/Spacing';
import Text from '@shared/text/Text';
import { Colors } from '@styles/colorPalette';

interface TitleProps {
title: string
description?: string
title: React.ReactNode
titleSize?: Typography
description?: React.ReactNode
descriptionColor?: Colors
titleIcon?: React.ReactNode
size?: number
}

function Title({
title, description, descriptionColor, titleIcon, size = 10,
title, titleSize = 't1', description, descriptionColor, titleIcon, size = 10,
}: TitleProps) {
return (
<Flex direction="column">
<Flex justify="space-between" align="center">
<Text typography="t1" bold>{title}</Text>
<Text typography={titleSize} bold>{title}</Text>
{titleIcon}
</Flex>
<Spacing size={size} />
Expand Down

0 comments on commit eb78129

Please sign in to comment.