feedback list 기능추가. 상단바 추가. 테마 적용 안됨.
This commit is contained in:
25
viewer/src/components/Header.js
Normal file
25
viewer/src/components/Header.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
import { NavLink } from "react-router-dom";
|
||||
import { ProjectSelectBox } from "./ProjectSelectBox";
|
||||
import { Separator } from "./ui/separator";
|
||||
import { ThemeSelectBox } from "./ThemeSelectBox";
|
||||
import { LanguageSelectBox } from "./LanguageSelectBox";
|
||||
import { UserProfileBox } from "./UserProfileBox";
|
||||
import { useSettingsStore } from "@/store/useSettingsStore";
|
||||
const menuItems = [
|
||||
{ name: "Landing", path: "/" },
|
||||
{ name: "Feedback", path: "/feedbacks" },
|
||||
{ name: "Issue", path: "/issues" },
|
||||
];
|
||||
export function Header() {
|
||||
const projectId = useSettingsStore((state) => state.projectId);
|
||||
const getFullPath = (path) => {
|
||||
if (path === "/")
|
||||
return `/projects/${projectId}`; // Landing 페이지 경로 예시
|
||||
if (path.startsWith("/")) {
|
||||
return `/projects/${projectId}/channels/4${path}`; // 채널 ID는 4로 고정
|
||||
}
|
||||
return path;
|
||||
};
|
||||
return (_jsxs("header", { className: "flex h-16 items-center border-b px-4", children: [_jsx(ProjectSelectBox, {}), _jsx(Separator, { orientation: "vertical", className: "mx-4 h-8" }), _jsx("nav", { className: "flex items-center space-x-4 lg:space-x-6 flex-1", children: menuItems.map((item) => (_jsx(NavLink, { to: getFullPath(item.path), className: ({ isActive }) => `text-sm font-medium transition-colors hover:text-primary ${!isActive ? "text-muted-foreground" : ""}`, children: item.name }, item.name))) }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(ThemeSelectBox, {}), _jsx(LanguageSelectBox, {}), _jsx(UserProfileBox, {})] })] }));
|
||||
}
|
||||
Reference in New Issue
Block a user