File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { createContext , ReactNode , useContext } from "react" ;
1+ import { createContext , Fragment , ReactNode , useContext } from "react" ;
22import { ModalItemProvider } from "./item-context" ;
33import {
44 InternalModalInstance ,
@@ -60,7 +60,7 @@ function Modals({
6060 } ;
6161
6262 return (
63- < ModalItemProvider key = { internalModalItem . id } modal = { internalModalItem } >
63+ < ModalItemProvider modal = { internalModalItem } >
6464 { modal ? (
6565 modal ( modalProps , modalManager )
6666 ) : (
@@ -82,7 +82,11 @@ function Modals({
8282 return (
8383 < >
8484 { isLoading && loading && loading ( modalManager ) }
85- { stack . map ( ( internalModal ) => renderModal ( internalModal ) ) }
85+ { stack . map ( ( internalModal ) => (
86+ < Fragment key = { internalModal . id } >
87+ { renderModal ( internalModal ) }
88+ </ Fragment >
89+ ) ) }
8690 { ( isLoading || stack . length > 0 ) && backdrop && backdrop ( modalManager ) }
8791 </ >
8892 ) ;
You can’t perform that action at this time.
0 commit comments