mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: resolve file conflicts
This commit is contained in:
@@ -8,26 +8,6 @@
|
||||
|
||||
import qs from "qs";
|
||||
|
||||
export const getFromQuery = ({
|
||||
key,
|
||||
search,
|
||||
defaultValue = "",
|
||||
}: {
|
||||
key: string;
|
||||
search?: string;
|
||||
defaultValue?: string;
|
||||
}) => {
|
||||
try {
|
||||
const paramsString = search || window.location.search;
|
||||
const searchParams = new URLSearchParams(paramsString);
|
||||
const loadCampaign = searchParams.get(key) || defaultValue;
|
||||
|
||||
return loadCampaign;
|
||||
} catch (e) {
|
||||
return defaultValue;
|
||||
}
|
||||
};
|
||||
|
||||
export const buildURL = (baseUrl: string, relativePath: string): string => {
|
||||
try {
|
||||
return new URL(relativePath).toString();
|
||||
|
||||
Reference in New Issue
Block a user