HEX
Server: Apache
System: Linux webm020.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: bohousj (181416)
PHP: 8.4.22
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/bohousj/www/wp-content/plugins/woocommerce-stock-manager/admin/assets/src/hooks/useI18n.js
import { useContext } from 'react';
import { ReactReduxContext } from 'react-redux';
import { getTextDomain } from '../store/app';

const useI18n = () => {
  const redux = useContext(ReactReduxContext);
  const textDomain = getTextDomain(redux.store.getState());

  const { __ } = wp.i18n;
  return { __, textDomain };
};

export default useI18n;