1/** 2 * Copyright (c) 2023 Gitpod GmbH. All rights reserved. 3 * Licensed under the GNU Affero General Public License (AGPL). 4 * See License.AGPL.txt in the project root for license information. 5 */ 6 7import { useMemo } from "react"; 8import { useLocation } from "react-router"; 9 10export const useQueryParams = () => { 11 const { search } = useLocation(); 12 13 return useMemo(() => new URLSearchParams(search), [search]); 14}; 15 16