Compare commits

..

3 Commits

Author SHA1 Message Date
Kendall Garner 2329bc77d8 use urlsearchparams instead of qs 2026-04-19 17:37:21 -07:00
Kendall Garner 8869278898 make theme selector serachable 2026-04-10 20:03:50 -07:00
Jeff 16c9e6cc1b Fix various build issues (#1942)
* remove dynamic import for platform features

* increase node memory limit on macOS build

* fix invalid dynamic imports in renderer

* remove discord-rpc import in renderer
2026-04-10 01:54:11 -07:00
2 changed files with 21 additions and 3 deletions
+20 -3
View File
@@ -1,6 +1,5 @@
import { initClient, initContract } from '@ts-rest/core';
import axios, { AxiosError, AxiosRequestConfig, AxiosResponse, isAxiosError } from 'axios';
import omitBy from 'lodash/omitBy';
import qs from 'qs';
import { z } from 'zod';
@@ -380,8 +379,26 @@ axiosClient.interceptors.response.use(
const parsePath = (fullPath: string) => {
const [path, params] = fullPath.split('?');
const parsedParams = qs.parse(params, { arrayLimit: 99999, parameterLimit: 99999 });
const notNilParams = omitBy(parsedParams, (value) => value === 'undefined' || value === 'null');
const url = new URLSearchParams(params);
const notNilParams: Record<string, string[]> = {};
for (const [key, value] of url) {
if (value === 'undefined' || value === 'null') {
continue;
}
let realKey = key;
if (key.includes('[') && key.includes(']')) {
realKey = key.split('[')[0];
}
if (realKey in notNilParams) {
notNilParams[realKey].push(value);
} else {
notNilParams[realKey] = [value];
}
}
return {
params: notNilParams,
@@ -146,6 +146,7 @@ export const ThemeSettings = memo(() => {
}
}}
renderOption={renderThemeOption}
searchable
width={240}
/>
),