[lib] Convert sidebarInfoSelector to a hook
Summary:
This will make a following diff a little easier.
Depends on D13921
Test Plan: Flow. Also tested in combination with the rest of the stack
Reviewers: tomek
Reviewed By: tomek
Differential Revision: https://phab.comm.dev/D13911