[lib] make useJoinCommunity compatible with the auto join community handler
Summary:
This diff updates useJoinCommunity to be more agnostic so that this hook can be used for both invite links + auto join community handler
Depends on D12706
Test Plan: flow + confirmed that there were no regressions with the joining a community through accepitng an invite link user flow
Reviewers: ashoat, inka
Reviewed By: ashoat
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D12713