Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/pages/workspace/companyCards/addNew/AddNewCardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,11 @@ function AddNewCardPage({policy}: WithPolicyAndFullscreenLoadingProps) {
}, []);

useEffect(() => {
// If the user only has a domain feed, a workspace account may not have been created yet.
// However, adding a workspace feed requires a workspace account.
// Calling openPolicyAddCardFeedPage will trigger the creation of a workspace account.
if (workspaceAccountID) {
return;
}
// If the user only has a domain feed, then the workspace account may not have been created yet, or the "Company cards" workspace-level feature may not have been enabled yet
// However, adding a workspace feed requires a workspace account with "Company cards" feature enabled.
// Calling openPolicyAddCardFeedPage will trigger the creation of the workspace account (if necessary) and enable the "Company cards" feature (if not enabled).
openPolicyAddCardFeedPage(policyID);
}, [workspaceAccountID, policyID]);
}, [policyID]);

if (isAddCardFeedLoading || isAllFeedsResultLoading || isBlockedToAddNewFeeds) {
return <FullScreenLoadingIndicator />;
Expand Down
Loading