currentChannel is always null in UIKit React SDK

UIKit version: “@sendbird/uikit-react”: “^3.1.0”,

I am trying to find a way to get the currently selected channel object (not the channelUrl) from the hooks provided by Sendbird.
There is only one hook that provides the current channel object - useChannelListContext. But the value { currentChannel } returned is always null (even after selecting the channel from the channel list). See console logs in the codesandbox link below.

Please help me to get the current channel.

I want to send a file message but the endpoint sendFileMessage only takes the channel object and not the channelUrl as described in the docs here: File sharing | UIKit React SDK | Sendbird Docs