dashboard 형태의 UI 수정 및 고도화

This commit is contained in:
2026-03-04 08:29:39 +09:00
parent 618d5f8e6f
commit ccc9f7c634
17 changed files with 1296 additions and 224 deletions

View File

@@ -0,0 +1,31 @@
import React from 'react';
import { useLocation } from 'react-router-dom';
import { navLinks } from '../routes.jsx';
import './PageHeader.css';
const PageHeader = () => {
const { pathname } = useLocation();
// Home 페이지에서는 Hero 섹션이 있으므로 숨김
if (pathname === '/') return null;
// stock/trade 같은 하위 경로도 stock로 매칭
const current = navLinks.find((link) => {
if (link.path === '/') return false;
return pathname === link.path || pathname.startsWith(link.path + '/');
});
if (!current) return null;
return (
<header className="page-header" style={{ '--page-accent': current.accent }}>
<div className="page-header__inner">
<p className="page-header__subtitle">{current.subtitle}</p>
<h1 className="page-header__title">{current.label}</h1>
</div>
<div className="page-header__line" />
</header>
);
};
export default PageHeader;