MCPcopy Create free account
hub / github.com/Superflows-AI/superflows / ClarifyCloseModal

Function ClarifyCloseModal

components/warningModal.tsx:126–155  ·  view source on GitHub ↗
(
  props: ModalProps & { shouldClarify: boolean },
)

Source from the content-addressed store, hash-verified

124}
125
126export function ClarifyCloseModal(
127 props: ModalProps & { shouldClarify: boolean },
128) {
129 const [clarify, setClarify] = useState(false);
130
131 return (
132 <>
133 <Modal
134 {...{
135 ...props,
136 // Show the clarify modal
137 setOpen: () =>
138 props.shouldClarify ? setClarify(true) : props.setOpen(false),
139 }}
140 >
141 {props.children}
142 </Modal>
143 <WarningModal
144 open={clarify}
145 setOpen={setClarify}
146 title={"Discard changes"}
147 description={
148 "There are unsaved changes. Are you sure you want to discard them?"
149 }
150 actionName={"Discard"}
151 action={() => props.setOpen(false)}
152 />
153 </>
154 );
155}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected