is there a way to detect offline state in the network, so we can serve different content, using the hooks?