Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2bb828c
feat:로그인페이지 내계좌연결
junlae223 Jun 11, 2025
c254e2f
fix:오류수정
junlae223 Jun 11, 2025
ffc4593
fix:오류수정
junlae223 Jun 11, 2025
32dd4bc
fix: 내계좌 오류수정
junlae223 Jun 11, 2025
434af1b
fix: 비로그인시 호출안되게수정
junlae223 Jun 11, 2025
0150af6
feat: 목데이터삭제 계좌연결
junlae223 Jun 11, 2025
9ac596a
feat: 마이페이지 포트폴리오 수정
junlae223 Jun 11, 2025
d14845c
fix:총투자비율, 수익률 수정
junlae223 Jun 11, 2025
2f50b23
test
junlae223 Jun 12, 2025
1dcfb28
Merge branch 'sanghyun' of https://github.com/WeGoMars/mars-fe into JL
junlae223 Jun 12, 2025
d5573f7
chore: update email placeholder text
junlae223 Jun 12, 2025
c652be6
Merge branch 'sanghyun' of https://github.com/WeGoMars/mars-fe into JL
junlae223 Jun 12, 2025
24434e1
Merge branch 'sanghyun' of https://github.com/WeGoMars/mars-fe into JL
junlae223 Jun 12, 2025
f2c09d9
Merge branch 'sanghyun' of https://github.com/WeGoMars/mars-fe into JL
junlae223 Jun 12, 2025
e6ac8a1
chore: 글씨색상변경
junlae223 Jun 12, 2025
d921fe8
Merge branch 'sanghyun' of https://github.com/WeGoMars/mars-fe into JL
junlae223 Jun 12, 2025
d31e1fc
chore: 수익률 표현수정
junlae223 Jun 12, 2025
5b07a72
chore: 글씨색상수정
junlae223 Jun 12, 2025
cb5f781
chore:투자금액 색변경
junlae223 Jun 12, 2025
c874cb1
chroe: 내계좌 %수정
junlae223 Jun 12, 2025
9467f0c
chroe: roe , 부채비율 %수정
junlae223 Jun 12, 2025
6d2ee1a
chroe: 수익률 %수정
junlae223 Jun 12, 2025
0ed034b
Merge branch 'develop' of https://github.com/WeGoMars/mars-fe into JL
junlae223 Jun 14, 2025
30f22a3
style: 포트폴리오, 로그인버튼수정
junlae223 Jun 14, 2025
d1c05fb
style: 포트폴리오, 버튼ui 수정
junlae223 Jun 14, 2025
4353632
style: 회원가입폼 수정중
junlae223 Jun 14, 2025
503bdbd
style: 회원가입폼, 로그아웃버튼 수정
junlae223 Jun 14, 2025
bacbc12
style: 로그아웃버튼수정
junlae223 Jun 14, 2025
ec911f0
style:포트폴리오, 내계좌수정
junlae223 Jun 14, 2025
da8892f
style: 포트폴리오 ui테스트
junlae223 Jun 14, 2025
9301ea2
style: 마이페이지 간격수정
junlae223 Jun 14, 2025
0a1fb4f
style: 로그인모달수정
junlae223 Jun 14, 2025
9ca2369
style: 평가손익 내계좌 수정
junlae223 Jun 15, 2025
8e1e3cf
style: 포트폴리오 카드ui 수정
junlae223 Jun 15, 2025
068e614
style: 포트폴리오 최종수정
junlae223 Jun 15, 2025
33720fa
style: 관심종목테스트
junlae223 Jun 15, 2025
47c2832
style: 수정
junlae223 Jun 15, 2025
5c04d14
style:
junlae223 Jun 15, 2025
38c8f2e
style: 종목검색 test
junlae223 Jun 15, 2025
1b92cab
style: 종목검색 글씨색상, round 수정
junlae223 Jun 15, 2025
159fbc5
style: 종목검색 white수정
junlae223 Jun 15, 2025
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
900 changes: 489 additions & 411 deletions app/dashboard/mypage/page.tsx

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import Link from "next/link";
import { Button } from "@/components/ui/button";
import ProfileModal from "@/components/common/ProfileModal";
import { Heart } from "lucide-react";
import mockPortfolio from "@/lib/mock/mockportfolio";

import ProfileHandler from "@/components/common/ProfileHandler";
import useSWR from "swr";
Expand Down Expand Up @@ -316,12 +315,12 @@ export default function Dashboard() {
isLoading: isPortfolioLoading,
isError: isPortfolioError,
} = useGetOverallPortfolioQuery();
const cyberDollars = walletData?.data?.cyberDollar ?? 0;
const cyberDollar = walletData?.data?.cyberDollar ?? 0;
const portfolioData = {
totalAssets: overallData?.data?.totalAsset ?? 0,
investmentAmount: overallData?.data?.investedAmount ?? 0,
profitLoss: overallData?.data?.evalGain ?? 0,
returnRate: (overallData?.data?.returnRate ?? 0) * 100,
returnRate: (overallData?.data?.returnRate ?? 0) * 10,
};

// 컴포넌트 마운트 시 실시간 데이터 가져오기
Expand Down Expand Up @@ -396,7 +395,7 @@ export default function Dashboard() {
내계좌
</Link>
<LogoutButton redirectTo="/">
<span className="bg-[#006ffd] text-white px-4 py-2 rounded-md w-full block text-center">
<span className="px-4 py-2 text-white hidden md:flex bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 rounded-xl shadow-lg hover:shadow-xl transition-all duration-200">
로그아웃
</span>
</LogoutButton>
Expand All @@ -414,7 +413,7 @@ export default function Dashboard() {
<div className="text-sm text-gray-600">
oo님 mars 모투에 오신걸 환영합니다
</div>
<button className="bg-[#006ffd] text-white px-4 py-2 rounded-md w-full">
<button className="px-4 py-2 text-white hidden md:flex bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 rounded-xl shadow-lg hover:shadow-xl transition-all duration-200">
로그아웃
</button>
<button
Expand Down Expand Up @@ -471,7 +470,8 @@ export default function Dashboard() {
{/* Left Column - Hidden on mobile, visible on lg screens */}
<div className="hidden lg:flex lg:w-64 flex-col">
{/* Interest Stocks Section */}
<div className="bg-[#f0f0f0] rounded-xl p-3 mb-4 text-center shadow-md">
{/* <div className="bg-[#f0f0f0] rounded-xl p-3 mb-4 text-center shadow-md"> */}
<div className="p-3 mb-4 text-center rounded-xl shadow-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white">
<span className="text-sm">관심 종목</span>
</div>

Expand Down Expand Up @@ -544,7 +544,8 @@ export default function Dashboard() {
</div>

{/* Purchased Stocks Section */}
<div className="bg-[#f0f0f0] rounded-xl p-3 my-4 text-center shadow-md">
{/* <div className="bg-[#f0f0f0] rounded-xl p-3 my-4 text-center shadow-md"> */}
<div className="p-3 my-4 text-center rounded-xl shadow-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white">
<span className="text-sm">내가 구매한 종목</span>
</div>

Expand Down Expand Up @@ -767,7 +768,7 @@ export default function Dashboard() {
name={selectedInfo.name}
price={selectedInfo.price}
totalAssets={portfolioData.totalAssets}
cyberDollar={cyberDollars}
cyberDollar={cyberDollar}
investmentAmount={portfolioData.investmentAmount}
profitLoss={portfolioData.profitLoss}
returnRate={portfolioData.returnRate}
Expand All @@ -786,7 +787,7 @@ export default function Dashboard() {
name={selectedInfo.name}
price={selectedInfo.price}
totalAssets={portfolioData.totalAssets}
cyberDollar={cyberDollars}
cyberDollar={cyberDollar}
investmentAmount={portfolioData.investmentAmount}
profitLoss={portfolioData.profitLoss}
returnRate={portfolioData.returnRate}
Expand Down
24 changes: 15 additions & 9 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { useState, useEffect } from "react";
import { Search, X, Menu, ChevronLeft, Minus, Plus } from "lucide-react";
import { Button } from "@/components/ui/button"
import Image from "next/image";
import StockChart from "@/components/StockChart";
import LoginModal from "@/components/common/LoginModal";
Expand Down Expand Up @@ -346,26 +347,30 @@ export default function FinanceDashboard() {

<div className="hidden md:flex items-center gap-3">
{/* <button onClick={() => setRegisterOpen(true)} */}
<button
type="button"
<Button
// type="button"
onClick={() => {
const url = new URL(window.location.href)
url.searchParams.set("modal", "register")
router.push(url.toString())
}}
className="border border-[#006ffd] text-[#006ffd] px-4 py-2 rounded-md hover:bg-[#f0f7ff] transition-colors">
// className="border border-[#006ffd] text-[#006ffd] px-4 py-2 rounded-xl hover:bg-[#f0f7ff] transition-colors">

variant="outline"
className="px-4 py-2 hidden md:flex rounded-xl border-slate-200 dark:border-slate-700 hover:bg-slate-50 dark:hover:bg-slate-800 transition-all duration-200"
>
회원가입
</button>
<button
</Button>
<Button
onClick={() => {
const url = new URL(window.location.href)
url.searchParams.set("modal", "login")
router.push(url.toString())
}}
className="bg-[#006ffd] text-white px-4 py-2 rounded-md hover:bg-[#0057cc] transition-colors"
>

className="px-4 py-2 text-white hidden md:flex bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 rounded-xl shadow-lg hover:shadow-xl transition-all duration-200">
로그인
</button>
</Button>
<LoginModal
open={loginOpen}
onOpenChange={(open) => {
Expand Down Expand Up @@ -464,7 +469,8 @@ export default function FinanceDashboard() {
{/* Left Column - Hidden on mobile, visible on lg screens */}
<div className="hidden lg:flex lg:w-64 flex-col">
{/* 오늘의 핫 종목 목록 */}
<div className="bg-[#f0f0f0] rounded-xl p-3 mb-4 text-center shadow-md">
{/* <div className="bg-[#f0f0f0] rounded-xl p-3 mb-4 text-center shadow-md"> */}
<div className="p-3 mb-4 text-center rounded-xl shadow-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white">
<span className="text-sm">오늘의 핫 종목</span>
</div>

Expand Down
14 changes: 7 additions & 7 deletions components/BuyPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,33 +105,33 @@ export default function BuyPanel({ open, onClose, symbol, name, totalAssets, pri
<div className="font-bold text-base">수익률</div>
<div>
<span className="text-xs mr-1">$</span>
<span className="text-xl font-bold">{returnRate.toFixed(2)}%</span>
<span className="text-xl font-bold">{(returnRate * 100).toFixed(2)}%</span>
</div>
</div>
<div className="flex justify-between items-center">
<div className="font-bold text-base">시드머니</div>
<div>
<span className="text-[#006ffd] text-xs mr-1">$</span>
<span className="text-[#006ffd] text-xl font-bold">{cyberDollar.toFixed(2)}</span>
<span className="text-[#0a0a0a] text-xs mr-1">$</span>
<span className="text-[#0a0a0a] text-xl font-bold">{cyberDollar.toFixed(2)}</span>
</div>
</div>
<div className="flex justify-between items-center">
<div className="font-bold text-base">투자금액</div>
<div>
<span className="text-[#439a86] text-xs mr-1">$</span>
<span className="text-[#439a86] text-xl font-bold">{investmentAmount.toFixed(2)}</span>
<span className="text-[#006ffd] text-xs mr-1">$</span>
<span className="text-[#006ffd] text-xl font-bold">{investmentAmount.toFixed(2)}</span>
</div>
</div>
<div className="flex justify-between items-center">
<div className="font-bold text-base">평가손익</div>
<div className="flex items-center">
<span
className={`text-xs mr-1 ${profitLoss >= 0 ? "text-[#e74c3c]" : "text-[#3498db]"}`}
className={`text-xs mr-1 ${profitLoss >= 0 ? "text-[#439a86]" : "text-[#e74c3c]"}`}
>
$
</span>
<span
className={`text-xl font-bold ${profitLoss >= 0 ? "text-[#e74c3c]" : "text-[#3498db]"}`}
className={`text-xl font-bold ${profitLoss >= 0 ? "text-[#439a86]" : "text-[#e74c3c]"}`}
>
{profitLoss >= 0 ? "+" : "-"}
{Math.abs(profitLoss).toFixed(2)}
Expand Down
7 changes: 4 additions & 3 deletions components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ export default function SearchBar({ onSelectStock }: SearchBarProps) {

return (
<div className="relative w-full max-w-2xl" ref={wrapperRef}>
<div className="flex items-center bg-[#f0f0f0] rounded-full px-4 py-3 shadow-md">
<Search className="text-gray-500 w-5 h-5 mr-3" />
{/* <div className="flex items-center bg-[#f0f0f0] rounded-full px-4 py-3 shadow-md"> */}
<div className=" hidden md:flex items-center bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 rounded-full shadow-lg hover:shadow-xl transition-all duration-200 px-4 py-3">
<Search className="text-white w-5 h-5 mr-3" />
<input
type="text"
placeholder="종목 검색"
Expand All @@ -81,7 +82,7 @@ export default function SearchBar({ onSelectStock }: SearchBarProps) {
setShowResults(true)
}}
onFocus={() => setShowResults(true)}
className="flex-1 bg-transparent border-0 focus:outline-none text-base text-gray-700 placeholder-gray-500"
className="flex-1 bg-transparent border-0 focus:outline-none text-base text-white placeholder-white"
/>
</div>

Expand Down
14 changes: 7 additions & 7 deletions components/SellPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,33 +103,33 @@ export default function SellPanel({ open, onClose, symbol, name, price, totalAss
<div className="font-bold text-base">수익률</div>
<div>
<span className="text-xs mr-1">$</span>
<span className="text-xl font-bold">{returnRate.toFixed(2)}%</span>
<span className="text-xl font-bold">{(returnRate * 100).toFixed(2)}%</span>
</div>
</div>
<div className="flex justify-between items-center">
<div className="font-bold text-base">시드머니</div>
<div>
<span className="text-[#006ffd] text-xs mr-1">$</span>
<span className="text-[#006ffd] text-xl font-bold">{cyberDollar.toFixed(2)}</span>
<span className="text-[#0a0a0a] text-xs mr-1">$</span>
<span className="text-[#0a0a0a] text-xl font-bold">{cyberDollar.toFixed(2)}</span>
</div>
</div>
<div className="flex justify-between items-center">
<div className="font-bold text-base">투자금액</div>
<div>
<span className="text-[#439a86] text-xs mr-1">$</span>
<span className="text-[#439a86] text-xl font-bold">{investmentAmount.toFixed(2)}</span>
<span className="text-[#006ffd] text-xs mr-1">$</span>
<span className="text-[#006ffd] text-xl font-bold">{investmentAmount.toFixed(2)}</span>
</div>
</div>
<div className="flex justify-between items-center">
<div className="font-bold text-base">평가손익</div>
<div className="flex items-center">
<span
className={`text-xs mr-1 ${profitLoss >= 0 ? "text-[#e74c3c]" : "text-[#3498db]"}`}
className={`text-xs mr-1 ${profitLoss >= 0 ? "text-[#439a86]" : "text-[#e74c3c]"}`}
>
$
</span>
<span
className={`text-xl font-bold ${profitLoss >= 0 ? "text-[#e74c3c]" : "text-[#3498db]"}`}
className={`text-xl font-bold ${profitLoss >= 0 ? "text-[#439a86]" : "text-[#e74c3c]"}`}
>
{profitLoss >= 0 ? "+" : "-"}
{Math.abs(profitLoss).toFixed(2)}
Expand Down
Loading