refactor: Typescript fixes and updates for bumping ts version to 5.8.2 (#19690)
* Typescript fixes and updates for bumping ts version to 5.8.2 * Different TS versions do see an error, so @ts-ignore'ing * Attempt this fix for ignoring createDecipher/createCipher fns * Remove @ts-expect-error
This commit is contained in:
1 parent
1545a8ec82
commit
6f62c6ad5d
17 files changed
+28
-23
No files matched your search
@@ -98,7 +98,7 @@ function useRouterHelpers() {
|
||||
const pathname = usePathname();
|
||||
|
||||
const goto = (newSearchParams: Record<string, string>) => {
|
||||
const newQuery = new URLSearchParams(searchParams ?? undefined);
|
||||
const newQuery = new URLSearchParams(searchParams.toString());
|
||||
newQuery.delete("slug");
|
||||
newQuery.delete("pages");
|
||||
Object.keys(newSearchParams).forEach((key) => {
|
||||
@@ -109,7 +109,7 @@ function useRouterHelpers() {
|
||||
};
|
||||
|
||||
const removeQueryParams = (queryParams: string[]) => {
|
||||
const params = new URLSearchParams(searchParams ?? undefined);
|
||||
const params = new URLSearchParams(searchParams.toString());
|
||||
|
||||
queryParams.forEach((param) => {
|
||||
params.delete(param);
|
||||
@@ -703,7 +703,7 @@ const EmbedTypeCodeAndPreviewDialogContent = ({
|
||||
const teamSlug = !!eventTypeData?.team ? eventTypeData.team.slug : null;
|
||||
|
||||
const s = (href: string) => {
|
||||
const _searchParams = new URLSearchParams(searchParams ?? undefined);
|
||||
const _searchParams = new URLSearchParams(searchParams.toString());
|
||||
const [a, b] = href.split("=");
|
||||
_searchParams.set(a, b);
|
||||
return `${pathname?.split("?")[0] ?? ""}?${_searchParams.toString()}`;
|
||||
|
||||
Reference in new issue
Block a user