-
Notifications
You must be signed in to change notification settings - Fork 0
[feat] 비교 분석 페이지 UI 구현 #28
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
31fd421
chore: 자산 내역 관련 아이콘 추가
wupe1001 74f10af
refactor: BackPageGNB 수정
wupe1001 c61fa36
feat: 자산 목록 및 단일 자산 내역 페이지 구현
wupe1001 f887d95
refactor: 자산 상세 페이지 UI 컴포넌트 분리
wupe1001 800dff3
refactor: 자산 상세 내역 로직을 커스텀 훅으로 분리
wupe1001 157c4bc
chore: 디자인 시스템 설정에 은행 컬러 추가
wupe1001 4855063
refactor: 하드코딩된 색상을 디자인 토큰으로 교체
wupe1001 418edec
refactor: 총 거래 내역 건수의 출처를 커스텀 훅으로 이동
wupe1001 c7e5c07
feat: 분야별 내역 UI 구현
seunghee0321 d8b6962
refactor: 상세 페이지 진입 시 중복 연산 제거 및 데이터 전달 로직 최적화
seunghee0321 1a3e016
refactor: 월별 조회 기능 구현
seunghee0321 8413de0
feat: 비교 분석 페이지 UI 구현
seunghee0321 bd0ce0d
refactor: 분석 페이지 컴포넌트 구조화 및 UI 최적화
seunghee0321 7f8b598
chore: 분야별 분석 및 비교 분석 기능 통합
seunghee0321 b95941a
chore: feat/sector-analysis 작업 내용 병합 및 충돌 해결
seunghee0321 30142e9
chore: 머지 충돌 해결 및 최신 main 반영
seunghee0321 a864fc5
refactor: 비교 내역 페이지 UI 개선
seunghee0321 01c11a1
chore: main 브랜치 충돌 해결
seunghee0321 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 hidden or 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 hidden or 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,29 @@ | ||
| // src/components/common/Toast.tsx | ||
| import { Typography } from '@/components/typography'; | ||
| import WarningIcon from '@/assets/icons/warning.svg'; | ||
| import { cn } from '@/utils/cn'; | ||
|
|
||
| export const Toast = ({ message, isOpen }: { message: string; isOpen: boolean }) => { | ||
| if (!isOpen) return null; | ||
|
|
||
| return ( | ||
| <div className="fixed bottom-[34px] w-full px-5 z-[9999]"> | ||
| <div | ||
| className={cn( | ||
| 'flex items-center shadow-lg', | ||
| 'w-[320px] h-[48px] rounded-[8px] gap-2 px-[10px] py-3', | ||
| 'backdrop-blur-[8px]' | ||
| )} | ||
| style={{ | ||
| backgroundColor: 'rgba(23, 23, 20, 0.45)', | ||
| }} | ||
| > | ||
| <img src={WarningIcon} alt="경고" className="w-6 h-6 flex-shrink-0" /> | ||
|
|
||
| <Typography variant="body-2" className="text-white flex-1 leading-[20px] text-[14px]"> | ||
| {message} | ||
| </Typography> | ||
| </div> | ||
| </div> | ||
| ); | ||
| }; | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,114 @@ | ||
| import { useNavigate } from 'react-router-dom'; | ||
| import { MobileLayout } from '@/components/layout/MobileLayout'; | ||
| import BackPageGNB from '@/components/gnb/BackPageGNB'; | ||
| import { Typography } from '@/components/typography'; | ||
| import { MoreViewButton } from '@/components/buttons/MoreViewButton'; | ||
|
|
||
| import SettingIcon from '@/assets/icons/menu/setting.svg'; | ||
| import MBTIIcon from '@/assets/icons/menu/mbti.svg'; | ||
| import TrophyIcon from '@/assets/icons/menu/trophy.svg'; | ||
| import LedgerIcon from '@/assets/icons/menu/ledger.svg'; | ||
| import ConnectionIcon from '@/assets/icons/menu/connection.svg'; | ||
|
|
||
| import AssetIcon from '@/assets/icons/menu/asset.svg'; | ||
| import GoalIcon from '@/assets/icons/menu/goal.svg'; | ||
| import RecommendIcon from '@/assets/icons/menu/recommend.svg'; | ||
|
|
||
| export const MenuGNB = () => { | ||
| const navigate = useNavigate(); | ||
|
|
||
| return ( | ||
| <MobileLayout className="bg-white"> | ||
| <BackPageGNB | ||
| title="전체" | ||
| onBack={() => navigate(-1)} | ||
| text={<img src={SettingIcon} alt="설정" />} | ||
| onSkip={() => navigate('/mypage/settings')} | ||
| className="bg-white border-b border-neutral-5" | ||
| titleColor="text-neutral-90" | ||
| /> | ||
|
|
||
| <div className="flex-1 overflow-y-auto pb-10"> | ||
| {/* 1. 상단 퀵 메뉴 그리드 */} | ||
| <div className="grid grid-cols-4 gap-y-6 px-5 py-8"> | ||
| <QuickMenuButton label="MBTI" icon={MBTIIcon} onClick={() => navigate('/mbti')} /> | ||
| <QuickMenuButton label="트로피" icon={TrophyIcon} /> | ||
| <QuickMenuButton label="가계부" icon={LedgerIcon} /> | ||
| <QuickMenuButton label="연결관리" icon={ConnectionIcon} /> | ||
| </div> | ||
|
|
||
| {/* 💡 2. 리스트 섹션 영역 시작 */} | ||
| <div className="flex flex-col"> | ||
| {/* 자산 섹션 (위에 선 생김) */} | ||
| <MenuSection title="자산" icon={AssetIcon}> | ||
| <MenuItem label="나의 자산내역" onClick={() => navigate('/asset')} /> | ||
| <MenuItem label="분야별 내역" onClick={() => navigate('/asset/sector')} /> | ||
| <MenuItem label="또래별 비교분석" onClick={() => navigate('/asset/compare')} /> | ||
| </MenuSection> | ||
|
|
||
| {/* 목표 섹션 (위에 선 생김) */} | ||
| <MenuSection title="목표" icon={GoalIcon}> | ||
| <MenuItem label="현재 목표" onClick={() => navigate('/goal/current')} /> | ||
| <MenuItem label="지난 목표" onClick={() => navigate('/goal/past')} /> | ||
| <MenuItem label="목표 새로 추가하기" /> | ||
| </MenuSection> | ||
|
|
||
| {/* 추천 섹션 (위에 선 생김) */} | ||
| <MenuSection title="추천" icon={RecommendIcon}> | ||
| <MenuItem label="추천 적금 바로가기" onClick={() => navigate('/recommend')} /> | ||
| </MenuSection> | ||
| </div> | ||
| </div> | ||
| </MobileLayout> | ||
| ); | ||
| }; | ||
|
|
||
| /** | ||
| * 💡 퀵 메뉴 버튼: 52x52 사이즈와 Neutrals/10 배경 적용 | ||
| */ | ||
| const QuickMenuButton = ({ label, icon, onClick }: { label: string; icon?: string; onClick?: () => void }) => ( | ||
| <button onClick={onClick} className="flex flex-col items-center gap-2"> | ||
| <div className="w-[52px] h-[52px] bg-neutral-10 rounded-xl flex items-center justify-center"> | ||
| {icon ? ( | ||
| <img src={icon} alt={label} className="justify-center" /> | ||
| ) : ( | ||
| <div className="w-6 h-6 bg-neutral-20 rounded" /> | ||
| )} | ||
| </div> | ||
| <Typography variant="caption-1" className="text-neutral-70"> | ||
| {label} | ||
| </Typography> | ||
| </button> | ||
| ); | ||
|
|
||
| /** | ||
| * 💡 메뉴 섹션 (자산, 목표 등 그룹) | ||
| */ | ||
| const MenuSection = ({ title, children, icon }: { title: string; children: React.ReactNode; icon: string }) => ( | ||
| <div className="flex flex-col border-t border-neutral-5"> | ||
| {' '} | ||
| {/* 💡 border-b 대신 border-t 사용! */} | ||
| <div className="px-5 pt-8 pb-4 flex items-center gap-2"> | ||
| <img src={icon} alt={title} className="w-5 h-5 object-contain" /> | ||
| <Typography variant="body-1" weight="bold" className="text-neutral-90"> | ||
| {title} | ||
| </Typography> | ||
| </div> | ||
| <div className="flex flex-col pb-4">{children}</div> | ||
| </div> | ||
| ); | ||
|
|
||
| /** | ||
| * 💡 MenuItem: div로 감싸서 중첩 버튼 에러 해결 | ||
| */ | ||
| const MenuItem = ({ label, onClick }: { label: string; onClick?: () => void }) => ( | ||
| <div | ||
| onClick={onClick} | ||
| className="w-full px-5 py-4 flex items-center justify-between active:bg-neutral-3 transition-colors text-left cursor-pointer" | ||
| > | ||
| <Typography variant="body-2" className="text-neutral-70"> | ||
| {label} | ||
| </Typography> | ||
| <MoreViewButton className="opacity-50 pointer-events-none" /> | ||
| </div> | ||
| ); |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -32,4 +32,4 @@ export interface TransactionGroup { | |
| totalIncome: number; | ||
| totalExpense: number; | ||
| items: TransactionItem[]; | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -103,4 +103,4 @@ export const useGetAccountDetail = () => { | |
| transactionHistory: mockHistory, | ||
| totalCount: 10, | ||
| }; | ||
| }; | ||
| }; | ||
seunghee0321 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.