Have a modal open by default Ant Design

Viewed 25

I am using ant design. I have a Offline component, the purpose is to diplay the modal whenever I wrap it into the component Offline, therefore I am trying to have the modal by default set to open true. However there is no way I can make it work...

<Offline>
  <Modal
    open={true}
    footer={null}
    keyboard={false}
    closable={false}
    centered>
  >
    <h2>ERROR</h2>
  </Modal>
</Offline>
0 Answers
Related