Skip to content

Commit

Permalink
[Fix] Removed Trail related code from session validate hook (#852)
Browse files Browse the repository at this point in the history
removed unwanted code
  • Loading branch information
jagadeeswaran-zipstack authored Nov 19, 2024
1 parent ca3917d commit 464b821
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions frontend/src/hooks/useSessionValid.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ import { useUserSession } from "./useUserSession.js";
import { listFlags } from "../helpers/FeatureFlagsData.js";
import { useAlertStore } from "../store/alert-store";

let getTrialDetails;
let isPlatformAdmin;
try {
getTrialDetails = require("../plugins/subscription/trial-helper/fetchTrialDetails.jsx");
isPlatformAdmin =
require("../plugins/hooks/usePlatformAdmin.js").usePlatformAdmin();
} catch (err) {
Expand Down Expand Up @@ -153,15 +151,6 @@ function useSessionValid() {
userAndOrgDetails["adapters"] = adapterTypes;
}

if (getTrialDetails && isUnstract) {
const remainingTrialDays = await getTrialDetails.fetchTrialDetails(
orgId,
csrfToken
);
if (remainingTrialDays)
userAndOrgDetails["remainingTrialDays"] = remainingTrialDays;
}

if (isUnstract) {
const flags = await listFlags(orgId, csrfToken);
userAndOrgDetails["flags"] = flags;
Expand Down

0 comments on commit 464b821

Please sign in to comment.