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: 프로필 페이지 #86

Merged
merged 4 commits into from
Jan 18, 2024
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
3 changes: 3 additions & 0 deletions public/assets/icons/linkArrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
--tertiary: #7A7A7A;
--tertiary-100: #EAEAEA;
--tertiary-200: #F6F6F6;
--tertiary-300: #F5F5F5;
--tertiary-400: #7C7A7A;
--black: #090A0A;
--white: #FFF;
Expand Down
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
list들에 border bottom 줘야할 것 같아요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 이따 고칠게요!

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;
15 changes: 15 additions & 0 deletions src/components/icons/LinkArrow.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
interface LinkArrowProps {
width?: number
height?: number
}

function LinkArrow({ width = 8, height = 14 }: LinkArrowProps) {
return (
<svg width={width} height={height} viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 1L6.68539 6.29289C7.10487 6.68342 7.10487 7.31658 6.68539 7.70711L1 13" stroke="#CDCFD0" strokeWidth="1.5" strokeLinecap="round" />
</svg>

);
}

export default LinkArrow;
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
1 change: 1 addition & 0 deletions src/styles/colorPalette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const colors = {
tertiary: 'var(--tertiary)',
tertiary100: 'var(--tertiary-100)',
tertiary200: 'var(--tertiary-200)',
tertiary300: 'var(--tertiary-300)',
tertiary400: 'var(--tertiary-400)',
black: 'var(--black)',
white: 'var(--white)',
Expand Down
Loading