@@ -66,12 +66,10 @@ function Content({
6666 children,
6767 className,
6868 style,
69- storeIdent = "side-nav-store" ,
7069} : {
7170 children : React . ReactNode
7271 className ?: string
7372 style ?: React . CSSProperties
74- storeIdent ?: string
7573} ) {
7674 const ref = useRef < HTMLDivElement > ( null )
7775
@@ -464,7 +462,8 @@ function NestingItem({
464462 sideNavStoreIdent = "default" ,
465463 title,
466464 _isOpen,
467- } : _NestingItemProps & { _isOpen ?: boolean } ) {
465+ id,
466+ } : _NestingItemProps & { _isOpen ?: boolean ; id ?: string } ) {
468467 const {
469468 getCurrentPathElement,
470469 pushPathElement,
@@ -498,6 +497,7 @@ function NestingItem({
498497 className = "rounded-full p-1 box-border bg-neutral-full size-5.5 text-text-inverse"
499498 />
500499 }
500+ id = { id }
501501 >
502502 { title }
503503 </ ButtonItem >
@@ -543,7 +543,7 @@ function NestableNavigationContent({
543543 className,
544544 style,
545545} : _NestableNavigationContentProps ) {
546- const { popPathElement, getCurrentPathElement, setTransitioning } =
546+ const { popPathElement, getCurrentPathElement, setTransitioning, path } =
547547 useSideNavigationStore ( sideNavStoreIdent )
548548
549549 const currentOpenedTitle = getCurrentPathElement ( )
@@ -552,6 +552,8 @@ function NestableNavigationContent({
552552 ? searchChild ( children , currentOpenedTitle )
553553 : null
554554
555+ console . log ( "currentOpenedTitle" , currentOpenedTitle , path , renderChild )
556+
555557 const [ isBack , setIsBack ] = useState ( false )
556558
557559 return (
@@ -561,7 +563,7 @@ function NestableNavigationContent({
561563 >
562564 < AnimatePresence initial = { false } mode = "popLayout" >
563565 { /* root level elements */ }
564- { ! renderChild && (
566+ { ! currentOpenedTitle && (
565567 < motion . div
566568 key = "outside"
567569 //layout
@@ -580,7 +582,7 @@ function NestableNavigationContent({
580582 ) }
581583 </ AnimatePresence >
582584 < AnimatePresence initial = { false } mode = "popLayout" >
583- { renderChild && (
585+ { currentOpenedTitle && (
584586 < motion . div
585587 key = "go-back-btn"
586588 initial = { { x : "100%" } }
0 commit comments