프로젝트 이름 관련 기타 정리사항
This commit is contained in:
@@ -1,58 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import { ArrowLeft, HelpCircle } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
interface PageHeaderProps {
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
showBackButton?: boolean;
|
||||
onBack?: () => void;
|
||||
showHelpButton?: boolean;
|
||||
onHelp?: () => void;
|
||||
children?: React.ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function PageHeader({
|
||||
title,
|
||||
subtitle,
|
||||
showBackButton = false,
|
||||
onBack,
|
||||
showHelpButton = false,
|
||||
onHelp,
|
||||
children,
|
||||
className,
|
||||
}: PageHeaderProps) {
|
||||
return (
|
||||
<div className={cn("flex items-center justify-between border-b border-slate-200 pb-6", className)}>
|
||||
<div className="flex items-center space-x-4">
|
||||
{showBackButton && (
|
||||
<Button variant="ghost" size="sm" onClick={onBack} className="h-8 w-8 p-0">
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold text-slate-900">{title}</h1>
|
||||
{subtitle && <p className="mt-1 text-sm text-slate-600">{subtitle}</p>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
{children}
|
||||
{showHelpButton && (
|
||||
<Button variant="outline" size="sm" onClick={onHelp} className="h-8 w-8 p-0">
|
||||
<HelpCircle className="h-4 w-4" />
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// 페이지 헤더 액션 버튼 컴포넌트
|
||||
export function PageHeaderActions({ children, className }: { children: React.ReactNode; className?: string }) {
|
||||
return <div className={cn("flex items-center space-x-2", className)}>{children}</div>;
|
||||
}
|
||||
@@ -24,8 +24,6 @@ import { menuScreenApi } from "@/lib/api/screen";
|
||||
import { toast } from "sonner";
|
||||
import { MainHeader } from "./MainHeader";
|
||||
import { ProfileModal } from "./ProfileModal";
|
||||
import { PageHeader } from "./PageHeader";
|
||||
import { getPageInfo } from "@/constants/pageInfo";
|
||||
|
||||
// useAuth의 UserInfo 타입을 확장
|
||||
interface ExtendedUserInfo {
|
||||
@@ -408,10 +406,7 @@ export function AppLayout({ children }: AppLayoutProps) {
|
||||
</aside>
|
||||
|
||||
{/* 가운데 컨텐츠 영역 */}
|
||||
<main className="bg-background flex-1 p-6">
|
||||
<PageHeader title={getPageInfo(pathname).title} description={getPageInfo(pathname).description} />
|
||||
{children}
|
||||
</main>
|
||||
<main className="bg-background flex-1 p-6">{children}</main>
|
||||
</div>
|
||||
|
||||
{/* 프로필 수정 모달 */}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
interface PageHeaderProps {
|
||||
title: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 페이지 상단 헤더 컴포넌트
|
||||
* 제목, 설명, 추가 버튼 등을 표시
|
||||
*/
|
||||
export function PageHeader({ title, description }: PageHeaderProps) {
|
||||
return (
|
||||
<div className="mb-6">
|
||||
<div className="flex items-center">
|
||||
<div>
|
||||
<h1 className="text-3xl font-bold text-gray-900">{title}</h1>
|
||||
{description && <p className="text-muted-foreground">{description}</p>}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user