Skip to content

Commit

Permalink
use cache in root common data fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
andreymikhadyuk committed Nov 21, 2023
1 parent 1a30206 commit c722fdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/commonFeed/hooks/useCommonData/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const useCommonData = (userId?: string): Return => {
CommonService.getAllParentCommonsForCommon(common, true),
CommonService.getCommonsByDirectParentIds([common.id]),
rootCommonId
? GovernanceService.getGovernanceByCommonId(rootCommonId)
? GovernanceService.getGovernanceByCommonId(rootCommonId, true)
: null,
]);
const rootCommon = await getRootCommon(
Expand Down
2 changes: 1 addition & 1 deletion src/shared/hooks/useCases/useFullCommonData/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const getRootCommon = async (
return initialRootCommon;
}

return CommonService.getCommonById(rootCommonId);
return CommonService.getCommonById(rootCommonId, true);
};

export const useFullCommonData = (): Return => {
Expand Down

0 comments on commit c722fdf

Please sign in to comment.