@@ -3,7 +3,6 @@ import type { ReactNode } from "react";
33import { memo } from "react" ;
44import { Link , useLocation , useNavigate } from "@tanstack/react-router" ;
55
6- import { useThreadUndoNotice } from "../../hooks/showThreadUndoNotice" ;
76import { useEnvironmentIdentificationMode } from "../../hooks/useSettings" ;
87import { cn } from "../../lib/utils" ;
98import { usePullRequestsSupported } from "../../state/environments" ;
@@ -38,7 +37,6 @@ export const SidebarChromeHeader = memo(function SidebarChromeHeader({
3837 isElectron : boolean ;
3938} ) {
4039 const stageLabel = useEnvironmentStageLabel ( ) ;
41- const showingUndoNotice = useThreadUndoNotice ( ( state ) => state . notice !== null ) ;
4240 const environmentIdentificationMode = useEnvironmentIdentificationMode ( ) ;
4341 const backdropVariant = resolveSidebarStageBackdropVariant (
4442 stageLabel ,
@@ -65,8 +63,7 @@ export const SidebarChromeHeader = memo(function SidebarChromeHeader({
6563 />
6664 </ div >
6765 < div className = "relative z-10 flex h-8 min-w-0 flex-1 flex-wrap content-start items-center gap-x-2 overflow-hidden py-0.5" >
68- < SidebarThreadUndoNotice onBackdrop = { backdropVariant !== null } />
69- { showingUndoNotice ? null : < SidebarBrand onBackdrop = { backdropVariant !== null } /> }
66+ < SidebarBrand onBackdrop = { backdropVariant !== null } />
7067 { pillLabel ? (
7168 < div className = "ml-1 flex h-7 items-center" >
7269 < Badge data-environment-identification = "pill" size = "sm" variant = "secondary" >
@@ -231,9 +228,14 @@ const SidebarUtilityMenu = memo(function SidebarUtilityMenu() {
231228 ) ;
232229} ) ;
233230
234- export const SidebarChromeFooter = memo ( function SidebarChromeFooter ( ) {
231+ export const SidebarChromeFooter = memo ( function SidebarChromeFooter ( {
232+ showUndoNotice = false ,
233+ } : {
234+ showUndoNotice ?: boolean ;
235+ } ) {
235236 return (
236237 < SidebarFooter >
238+ { showUndoNotice ? < SidebarThreadUndoNotice /> : null }
237239 < SidebarProviderUpdatePill />
238240 < SidebarUpdateArchitectureWarning />
239241 < SidebarUtilityMenu />
0 commit comments