-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 컴포넌트 분리 * feat: 스타일 및 순서 모달 추가 * feat: 친구 냉장고 페이지 추가 * chore: 이미지 예시 추가
- Loading branch information
Showing
19 changed files
with
21,066 additions
and
826 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import Link from 'next/link'; | ||
import React from 'react'; | ||
import profileImg from '@/assets/profile.png'; | ||
import Image from 'next/image'; | ||
import { ArrowRightGray } from '../atoms/Icon'; | ||
|
||
interface FriendsFridgeItemProps { | ||
name: string; | ||
ingredientCount: number; | ||
linkTo: string; | ||
} | ||
|
||
const FriendsFridgeItem: React.FC<FriendsFridgeItemProps> = ({ | ||
name, | ||
ingredientCount, | ||
linkTo, | ||
}) => { | ||
return ( | ||
<div className="w-full flex items-center justify-between"> | ||
<div className="flex gap-[12px]"> | ||
<div> | ||
<Image src={profileImg} alt={`누군가의 프로필`} /> | ||
</div> | ||
<div className="flex flex-col"> | ||
<div className="heading4-semibold text-gray7">{name}</div> | ||
<div className="body2-medium text-gray5"> | ||
냉장고 저장 목록 {ingredientCount}개 | ||
</div> | ||
</div> | ||
</div> | ||
<Link href={`${linkTo}`}> | ||
<ArrowRightGray /> | ||
</Link> | ||
</div> | ||
); | ||
}; | ||
|
||
export default FriendsFridgeItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
import { SearchInput, WhiteBox } from '../atoms'; | ||
import { FriendsFridgeItem } from '../molecules'; | ||
import { AllowBottom } from '../atoms/Icon'; | ||
|
||
const FriendsFridgeList: React.FC<{ | ||
toggleIsOpenOrderListModal: () => void; | ||
}> = ({ toggleIsOpenOrderListModal }) => { | ||
return ( | ||
<div className="mt-[37px]"> | ||
<div className="mb-[19.5px] flex justify-between"> | ||
<div className="heading2-semibold text-gray8"> | ||
친구 목록<span className="heading2-bold text-primary3">13</span> | ||
</div> | ||
<div | ||
className="flex items-center gap-[6px]" | ||
onClick={toggleIsOpenOrderListModal} | ||
> | ||
<div>등록순</div> | ||
<AllowBottom /> | ||
</div> | ||
</div> | ||
<WhiteBox> | ||
<SearchInput placeholder="친구의 이름을 입력하세요" /> | ||
<div className="w-full flex flex-col gap-[24px]"> | ||
<FriendsFridgeItem name="김지수" ingredientCount={13} linkTo="#" /> | ||
<FriendsFridgeItem name="김지수" ingredientCount={13} linkTo="#" /> | ||
<FriendsFridgeItem name="김지수" ingredientCount={13} linkTo="#" /> | ||
</div> | ||
</WhiteBox> | ||
</div> | ||
); | ||
}; | ||
|
||
export default FriendsFridgeList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import React from 'react'; | ||
import { GreenArrowButton, WhiteBox } from '../atoms'; | ||
import { AppleIcon } from '@/components/atoms/IngredientIcons'; | ||
import Link from 'next/link'; | ||
|
||
const FriendsRecentBoard: React.FC = () => { | ||
const INGREDIENT_LIST = [ | ||
{ isToday: true }, | ||
{ isToday: false }, | ||
{ isToday: false }, | ||
]; | ||
return ( | ||
<WhiteBox className="flex"> | ||
<div className="text-primary2 body2-semibold">최신근황</div> | ||
<div className="text-center text-gray8"> | ||
김지수님이 | ||
<br /> | ||
토마토를 추가했어요! | ||
</div> | ||
<div className="text-gray6 body2-medium"> | ||
그밖에 신선한 재료를 구경할 수 있어요. | ||
</div> | ||
<div className="flex w-full justify-center gap-[6px]"> | ||
{INGREDIENT_LIST.map((ingredient) => ( | ||
<div | ||
className={`flex flex-col items-center gap-[9.5px] ${ingredient.isToday ? 'bg-[#FFD5C6]' : 'bg-gray1'} p-[12px] rounded-[12px]`} | ||
> | ||
<AppleIcon width={38} height={38} /> | ||
<div | ||
className={`body2-semibold ${ingredient.isToday ? 'text-point3' : ''}`} | ||
> | ||
오늘 추가 | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
<Link className="w-full" href="/friend/12"> | ||
<GreenArrowButton className="bg-primary2" text="친구 냉장고 보러가기" /> | ||
</Link> | ||
</WhiteBox> | ||
); | ||
}; | ||
|
||
export default FriendsRecentBoard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
import { Button, ModalBottom } from '../atoms'; | ||
import { EmptyRadioSVG, FullRadioSVG } from '../atoms/Icon'; | ||
|
||
const OrderListModal: React.FC<{ | ||
currentOrder: string; | ||
toggleIsOpenOrderListModal: () => void; | ||
}> = ({ toggleIsOpenOrderListModal, currentOrder }) => { | ||
const ORDER_LIST = ['등록순', '이름순']; | ||
|
||
return ( | ||
<ModalBottom blackClickHandler={toggleIsOpenOrderListModal}> | ||
<div className="w-full"> | ||
{ORDER_LIST.map((order) => ( | ||
<div className="flex flex-row items-center justify-between h-[70px]"> | ||
{currentOrder === order ? ( | ||
<> | ||
<div className="heading3-semibold">{order}</div> | ||
<FullRadioSVG /> | ||
</> | ||
) : ( | ||
<> | ||
<div className="heading3-semibold text-gray5">{order}</div> | ||
<EmptyRadioSVG /> | ||
</> | ||
)} | ||
</div> | ||
))} | ||
</div> | ||
<Button className="w-full bg-primary2" text="선택 완료" /> | ||
</ModalBottom> | ||
); | ||
}; | ||
|
||
export default OrderListModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { | ||
FridgeBoard, | ||
FridgeInfoBox, | ||
FridgeListModal, | ||
} from '@/components/organisms'; | ||
import Header from '@/components/organisms/Header'; | ||
import { type NextPage } from 'next'; | ||
import { useState } from 'react'; | ||
|
||
const FriendIdPage: NextPage = () => { | ||
const [isOpenFridgeListModal, setIsOpenFridgeListModal] = useState(false); | ||
|
||
const toggleIsOpenFridgeListModal: () => void = () => { | ||
setIsOpenFridgeListModal((prev) => !prev); | ||
}; | ||
|
||
return ( | ||
<> | ||
{isOpenFridgeListModal && ( | ||
<FridgeListModal | ||
isMyFridgeList | ||
toggleIsOpenFridgeListModal={toggleIsOpenFridgeListModal} | ||
/> | ||
)} | ||
<div className={'pt-[52px] min-h-screen'}> | ||
<Header headerTitle={'친구 냉장고'} /> | ||
<section className={`flex flex-col min-h-screen p-20 bg-gray1`}> | ||
<FridgeInfoBox | ||
toggleIsOpenFridgeListModal={toggleIsOpenFridgeListModal} | ||
/> | ||
<FridgeBoard /> | ||
</section> | ||
</div> | ||
</> | ||
); | ||
}; | ||
export default FriendIdPage; |
Oops, something went wrong.