Add a `NetworkMonitor` component to track the network connection status