Delete more deprecated frontend calls

This commit is contained in:
Tuan Dang
2023-08-09 17:55:57 +07:00
parent 2a1665a2c3
commit b47f61f1ad
19 changed files with 121 additions and 289 deletions
@@ -1,5 +1,5 @@
import { fetchUserAction } from "@app/hooks/api/users/queries";
import getOrganizationUsers from "@app/pages/api/organization/GetOrgUsers";
import checkUserAction from "@app/pages/api/userActions/checkUserAction";
interface OnboardingCheckProps {
setTotalOnboardingActionsDone?: (value: number) => void;
@@ -20,25 +20,23 @@ const onboardingCheck = async ({
setUsersInOrg
}: OnboardingCheckProps) => {
let countActions = 0;
const userActionSlack = await checkUserAction({
action: "slack_cta_clicked"
});
const userActionSlack = await fetchUserAction(
"slack_cta_clicked"
);
if (userActionSlack) {
countActions += 1;
}
if (setHasUserClickedSlack) setHasUserClickedSlack(!!userActionSlack);
const userActionSecrets = await checkUserAction({
action: "first_time_secrets_pushed"
});
const userActionSecrets = await fetchUserAction("first_time_secrets_pushed");
if (userActionSecrets) {
countActions += 1;
}
if (setHasUserPushedSecrets) setHasUserPushedSecrets(!!userActionSecrets);
const userActionIntro = await checkUserAction({
action: "intro_cta_clicked"
});
const userActionIntro = await fetchUserAction("intro_cta_clicked");
if (userActionIntro) {
countActions += 1;
}