Initial Commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { Outlet, useLocation } from "react-router-dom"
|
||||
import { SessionExpiryDialog } from "@/features/auth/components/SessionExpiryDialog"
|
||||
import { useSlidingRefresh } from "@/features/auth/hooks/useSlidingRefresh"
|
||||
import { PATHS } from "@/config/routes"
|
||||
import { PasteTargetBadge } from "./PasteTargetBadge"
|
||||
|
||||
/** 스니펫·챗봇(snap)을 감싸는 공통 래퍼 — 팔레트 화면들의 공용 UI/기능을 여기 한 곳에 둔다.
|
||||
* 각 화면은 <Outlet/> 으로 들어오고, 공통 요소(붙여넣기 대상 배지 등)는 여기서 한 번만 그린다.
|
||||
* 화면이 생기거나 없어져도 공통 부분은 그대로. (snap 전용 헤더·Ctrl+N 은 안쪽 SnapLayout 몫 — 여긴 진짜 공통만.)
|
||||
* h-screen: 안쪽 SnippetPalettePage 의 h-full 체인이 기댈 명시적 높이. */
|
||||
export function PaletteShell() {
|
||||
const { pathname } = useLocation()
|
||||
useSlidingRefresh()
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="h-screen">
|
||||
<Outlet />
|
||||
{pathname !== PATHS.SNIPPET && <PasteTargetBadge />}
|
||||
</div>
|
||||
<SessionExpiryDialog />
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user