"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useSearchParams = void 0;
var react_router_dom_1 = require("react-router-dom");
exports.useSearchParams = function () {
    var search = react_router_dom_1.useLocation().search;
    try {
        var obj_1 = {};
        var queryParams_1 = new URLSearchParams(search);
        Array.from(queryParams_1.keys()).forEach(function (key) {
            obj_1[key] = queryParams_1.get(key);
        });
        return obj_1;
    }
    catch (e) {
        console.log("Something went wrong in useSearchParams", e);
        return null;
    }
};
