HomePhabricator
Diffusion Comm 6dd1be25ce84

[lib] introduce community reducer

Description

[lib] introduce community reducer

Summary:
This diff introduces the barebones community reducer and all the necessary logic to get it integrated into our codebase. Subsequent diffs will handle extending the community reducer to handle other cases we need to cover in our business logic

Linear task: https://linear.app/comm/issue/ENG-6159/introduce-community-reducer and https://linear.app/comm/issue/ENG-6535/start-processing-community-store-ops-on-sqllite

Depends on D11165

Test Plan:
Ran the following code + confirmed that a community was being added from this dispatched action

const dispatch = useDispatch();

const fakeCommunityID = '256|84261';

const onPressAddCommunity = React.useCallback(() => {
  const communityInfo: CommunityInfo = {
    enabledApps: {
      calendar: true,
      wiki: false,
      tasks: true,
      files: true,
    },
  };

  dispatch({
    type: addCommunityActionType,
    payload: {
      id: fakeCommunityID,
      newCommunityInfo: communityInfo,
    },
  });
}, [dispatch]);

Reviewers: atul, inka, kamil, tomek

Reviewed By: atul, kamil, tomek

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D11166

Details

Provenance
ginsuAuthored on Feb 13 2024, 11:03 PM
Reviewer
atul
Differential Revision
D11166: [lib] introduce community reducer
Parents
rCOMM68efff3e6182: [web] Tab sync redux actions
Branches
Unknown
Tags
Unknown