HEX
Server: LiteSpeed
System: Linux premium212.web-hosting.com 4.18.0-553.124.4.lve.el8.x86_64 #1 SMP Fri May 15 13:02:13 UTC 2026 x86_64
User: vitanhod (1367)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /home/vitanhod/barnabites.es/wp-content/themes/rishi/inc/dashboard/components/Hooks.js
import { useLocation } from "react-router-dom";
import { __ } from '@wordpress/i18n'

const useQuery = () => {
    let location = useLocation();
    return new URLSearchParams(location.search);
}
const  useCurrentTab = () => {
    let tab = useQuery().get('page_tab')
    if (!tab) {
        tab = 'general'
    }
    return tab
}

export { useQuery, useCurrentTab }