/**
 * External dependencies
 */
import { useCheckoutContext } from '@kkart/base-context';

/**
 * Returns redirect url interface from checkout context.
 */
export const useCheckoutRedirectUrl = () => {
	const { redirectUrl, dispatchActions } = useCheckoutContext();

	return {
		redirectUrl,
		setRedirectUrl: dispatchActions.setRedirectUrl,
	};
};
