refactor(web): extract isServer/isClient utility & upgrade Node.js to 22.12.0 (#30803)

Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com>
This commit is contained in:
yyh
2026-01-12 12:57:43 +08:00
committed by GitHub
parent f9a21b56ab
commit 9161936f41
14 changed files with 40 additions and 20 deletions

View File

@ -21,6 +21,7 @@ import {
} from 'nuqs'
import { useCallback } from 'react'
import { ACCOUNT_SETTING_MODAL_ACTION } from '@/app/components/header/account-setting/constants'
import { isServer } from '@/utils/client'
/**
* Modal State Query Parameters
@ -176,7 +177,7 @@ export function usePluginInstallation() {
* clearQueryParams(['param1', 'param2'])
*/
export function clearQueryParams(keys: string | string[]) {
if (typeof window === 'undefined')
if (isServer)
return
const url = new URL(window.location.href)