@@ -2,10 +2,12 @@ import { GiselleLogo } from "@/components/giselle-logo";
22import Link from "next/link" ;
33import { SparklesIcon } from "./components/icons/sparkles" ;
44import { ModeButton } from "./components/mode-button" ;
5+ import { useFeatureFlags } from "./feature-flags/context" ;
56import { useGraph } from "./graph/context" ;
67import { playgroundModes } from "./graph/types" ;
78
89export function Header ( ) {
10+ const { viewFlag } = useFeatureFlags ( ) ;
911 return (
1012 < div className = "h-[60px] flex items-center justify-between mx-[20px]" >
1113 < div className = "flex gap-[8px] items-center" >
@@ -30,22 +32,26 @@ export function Header() {
3032 </div>
3133 */ }
3234 </ div >
33- < div className = "flex items-center gap-[10px]" >
34- < ModeButton mode = { playgroundModes . edit } > edit</ ModeButton >
35- < ModeButton mode = { playgroundModes . view } > view</ ModeButton >
36- </ div >
37- < div >
38- < button
39- type = "button"
40- className = "px-[16px] py-[8px] rounded-[8px] flex items-center gap-[2px] bg-[hsla(207,19%,77%,0.3)] font-rosart"
41- style = { {
42- boxShadow : "0px 0px 3px 0px hsla(0, 0%, 100%, 0.25) inset" ,
43- } }
44- >
45- < SparklesIcon className = "w-[18px] h-[18px] fill-white drop-shadow-[0.66px_1.32px_2.64px_hsla(0,0%,100%,0.25)]" />
46- < span > Run</ span >
47- </ button >
48- </ div >
35+ { viewFlag && (
36+ < div className = "flex items-center gap-[10px]" >
37+ < ModeButton mode = { playgroundModes . edit } > edit</ ModeButton >
38+ < ModeButton mode = { playgroundModes . view } > view</ ModeButton >
39+ </ div >
40+ ) }
41+ { viewFlag && (
42+ < div >
43+ < button
44+ type = "button"
45+ className = "px-[16px] py-[8px] rounded-[8px] flex items-center gap-[2px] bg-[hsla(207,19%,77%,0.3)] font-rosart"
46+ style = { {
47+ boxShadow : "0px 0px 3px 0px hsla(0, 0%, 100%, 0.25) inset" ,
48+ } }
49+ >
50+ < SparklesIcon className = "w-[18px] h-[18px] fill-white drop-shadow-[0.66px_1.32px_2.64px_hsla(0,0%,100%,0.25)]" />
51+ < span > Run</ span >
52+ </ button >
53+ </ div >
54+ ) }
4955 </ div >
5056 ) ;
5157}
0 commit comments