Skip to content

Commit

Permalink
Change getRuleContextValue method name
Browse files Browse the repository at this point in the history
  • Loading branch information
jeradrutnam committed Jan 6, 2025
1 parent dec621d commit bc75b2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions features/admin.actions.v1/components/action-config-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { AppState } from "@wso2is/admin.core.v1";
import useGetRulesMeta from "@wso2is/admin.rules.v1/api/use-get-rules-meta";
import RulesComponent from "@wso2is/admin.rules.v1/components/rules-component";
import { RuleInterface } from "@wso2is/admin.rules.v1/models/rules";
import { getRuleContextValue } from "@wso2is/admin.rules.v1/providers/rules-provider";
import { getRuleInstanceValue } from "@wso2is/admin.rules.v1/providers/rules-provider";
import { AlertLevels, IdentifiableComponentInterface } from "@wso2is/core/models";
import { addAlert } from "@wso2is/core/store";
import { URLUtils } from "@wso2is/core/utils";
Expand Down Expand Up @@ -114,7 +114,7 @@ const ActionConfigForm: FunctionComponent<ActionConfigFormInterface> = ({
data: RulesMeta
} = useGetRulesMeta(actionTypeApiPath);

const showRulesComponent: boolean = false;
const showRulesComponent: boolean = true;

/**
* The following useEffect is used to set the current Action Authentication Type.
Expand All @@ -131,7 +131,7 @@ const ActionConfigForm: FunctionComponent<ActionConfigFormInterface> = ({
// TODO: Use this function to get the rule value.
/* eslint-disable @typescript-eslint/no-unused-vars */
const handleGetRuleValue = () => {
const ruleValue: RuleInterface[] = getRuleContextValue();
const ruleValue: RuleInterface[] = getRuleInstanceValue();
};
/* eslint-enable @typescript-eslint/no-unused-vars */

Expand Down
2 changes: 1 addition & 1 deletion features/admin.rules.v1/contexts/rules-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ export interface RulesContextInterface {
const RulesContext: React.Context<RulesContextInterface | undefined> =
createContext<RulesContextInterface | undefined>(undefined);

RulesContext.displayName = "RulesContyext";
RulesContext.displayName = "RulesContext";

export default RulesContext;
2 changes: 1 addition & 1 deletion features/admin.rules.v1/providers/rules-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const RuleContextRef: { ruleInstance: RuleInterface[] | undefined } = { ruleInst
*
* @returns RuleInstanceData
*/
export const getRuleContextValue = () => RuleContextRef.ruleInstance;
export const getRuleInstanceValue = () => RuleContextRef.ruleInstance;

/**
* Provider for the RulesContext
Expand Down

0 comments on commit bc75b2b

Please sign in to comment.